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.
0x00485cf0 (_INS0432._MP..text+0x84cf0 in C:\temp_INS0432._MP): divl 0x18(%ebp),%eax Wine-dbg>parse error First chance exception: divide by zero in 32-bit code (0x00485cf0). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:008f GS:0000 EIP:00485cf0 ESP:40476a00 EBP:40476a58 EFLAGS:00010246( R- 00 I Z- -P1 ) EAX:00000000 EBX:4055bc8c ECX:00000000 EDX:00000000 ESI:00000000 EDI:00020029 Stack dump: 0x40476a00 (NTDLL.DLL.sqrt+0x2790dc): 00020029 00000000 4055bc8c 40110e80 0x40476a10 (NTDLL.DLL.sqrt+0x2790ec): 405fcea4 405fcd20 0000135a 40476a34 0x40476a20 (NTDLL.DLL.sqrt+0x2790fc): 405d4c86 405fc324 405fcea4 402239c6 0x40476a30 (NTDLL.DLL.sqrt+0x27910c): 0000135a 40476a4c 405c86ff 00000000 0x40476a40 (NTDLL.DLL.sqrt+0x27911c): 00000000 00000000 402239c6 40476a68 0x40476a50 (NTDLL.DLL.sqrt+0x27912c): 405d4f8f 0000135a 40476ad8 00484a8e 0x40476a60 (NTDLL.DLL.sqrt+0x27913c):
0011: sel=008f base=40110e80 limit=00000fff 32-bit rw- Backtrace: =>0 0x00485cf0 (_INS0432._MP..text+0x84cf0 in C:\temp_INS0432._MP) (ebp=40476a58) 1 0x00484a8e (_INS0432._MP..text+0x83a8e in C:\temp_INS0432._MP) (ebp=40476ad8) 2 0x00482d25 (_INS0432._MP..text+0x81d25 in C:\temp_INS0432._MP) (ebp=40476b5c) 3 0x0046c40e (_INS0432._MP..text+0x6b40e in C:\temp_INS0432._MP) (ebp=40476bb0) 4 0x0046c358 (_INS0432._MP..text+0x6b358 in C:\temp_INS0432._MP) (ebp=40476bfc) 5 0x00406d06 (_INS0432._MP..text+0x5d06 in C:\temp_INS0432._MP) (ebp=40476c24) 6 0x004058fa (_INS0432._MP..text+0x48fa in C:\temp_INS0432._MP) (ebp=40476c8c) 7 0x00401c0e (_INS0432._MP..text+0xc0e in C:\temp_INS0432._MP) (ebp=40476cb4) 8 0x4050ccb7 (WINPROC_wrapper+0x17 in user32.dll.so) (ebp=40476cd8) 9 0x4050cd42 (WINPROC_CallWndProc+0x82(proc=0x401914, hwnd=0x20029, msg=0xf, wParam=0x0, lParam=0x0) [winproc.c:183] in user32.dll.so) (ebp=40476d08) 10 0x4051308f (CallWindowProcA+0xab(func=0x40bf0640, hwnd=0x20029, msg=0xf, wParam=0x0, lParam=0x0) [winproc.c:2795] in user32.dll.so) (ebp=40476d3c) 11 0x404f55d6 (DispatchMessageA+0x11e(msg=0x40476d9c) [message.c:1063] in user32.dll.so) (ebp=40476d80) 12 0x004011af (_INS0432._MP..text+0x1af in C:\temp_INS0432._MP) (ebp=40476dc0) 13 0x00401824 (_INS0432._MP..text+0x824 in C:\temp_INS0432._MP) (ebp=40476df8) 14 0x004873db (_INS0432._MP.EntryPoint+0x14b in C:\temp_INS0432._MP) (ebp=40476e8c) 15 0x400bc1ec (start_process+0x264 [process.c:530] in libntdll.dll.so) (ebp=40476f38) 16 0x400c009b (call_on_thread_stack+0x23(func=0x400bbf88) [sysdeps.c:105] in libntdll.dll.so) (ebp=40476ff4) 17 0x400c0234 (SYSDEPS_CallOnStack+0x14 in libntdll.dll.so) (ebp=00000000)
0x00485cf0 (_INS0432._MP..text+0x84cf0 in C:\temp_INS0432._MP): divl 0x18(%ebp),%eax Wine-dbg>parse error
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" );