Infinite loop in winedebug

Eric Pouech eric.pouech at wanadoo.fr
Sun Jun 23 03:56:23 CDT 2002


Duane Clark a écrit :
> 
> During an installation, wine crashed and went into the debugger, which
> proceeded to go into an infinite loop. This is with current CVS. Oddly,
> it only goes into the infinite loop if I have:
> "UseXTerm"=dword:00000000
> Allowing winedebug to use its own xterm, the debugger works fine. Here
> is one iteration of the loop.
basically, it seems the debugger (or in this case any console base
program) cannot get a decent input stream and gets a bit confused about
it. asking the debugger not to use any inherited input stream (UseXTerm
= 1) is the preferred way to handle this.

the attached patch should prevent the loop in debugger input

A+

Index: debugger/debug.l
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/debugger/debug.l,v
retrieving revision 1.27
diff -u -r1.27 debug.l
--- debugger/debug.l    13 Jun 2002 21:37:41 -0000      1.27
+++ debugger/debug.l    23 Jun 2002 08:54:29 -0000
@@ -29,7 +29,7 @@

 #undef YY_INPUT
 #define YY_INPUT(buf,result,max_size) \
-       if ( (result = DEBUG_ReadLine("Wine-dbg>", (char *) buf,
max_size, TRUE, TRUE )) < 0 ) \
+       if ( (result = DEBUG_ReadLine("Wine-dbg>", (char *) buf,
max_size, TRUE, TRUE )) <= 0 ) \
            YY_FATAL_ERROR( "read() in flex scanner failed" );



More information about the wine-devel mailing list