http://bugs.winehq.org/show_bug.cgi?id=20380
Michael Builov mbuilov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mbuilov@gmail.com
--- Comment #71 from Michael Builov mbuilov@gmail.com 2010-02-12 19:57:22 --- finally, i found that the bug is in... ntdll.dll.so :) It's because SIGUSR1 is not blocked in SIGSEGV handler. I have attached gdb to Heroes3.exe and set two breakpoints: one at start of usr1_handler (breakpoint 1), other - at start of segv_handler (breakpoint 5) in dlls/ntdll/signal_i386.c. Then i setup breakpoints to not stop, just to print registers and backtrace.
And just before i get record in log "0009:err:seh:setup_exception_record nested exception on signal stack in thread 0009 eip 7efb5800 esp 7ffdbc7c stack 0x242000-0x340000 0009: *killed* exit_code=0"
i see in debugger
Breakpoint 5, 0x7efb4e40 in ?? () eax 0xb 11 ecx 0x7ffdbd0c 2147335436 edx 0x7ffdbc8c 2147335308 ebx 0x7df8bc00 2113453056 esp 0x7ffdbc7c 0x7ffdbc7c ebp 0x329db0 0x329db0 esi 0x1821d10 25304336 edi 0x1731d10 24321296 eip 0x7efb4e40 0x7efb4e40 eflags 0x200216 [ PF AF IF ID ] cs 0x23 35 ss 0x2b 43 ds 0x2b 43 es 0x2b 43 fs 0x63 99 gs 0x6b 107 #0 0x7efb4e40 in ?? () #1 <signal handler called> #2 0xf7549a4c in ?? () #3 0x7df379e7 in ?? () #4 0x01731d10 in ?? () #5 0x01821d10 in ?? () #6 0x000001f4 in ?? () #7 0x00000000 in ?? ()
Breakpoint 1, 0x7efb5800 in ?? () eax 0xa 10 ecx 0x7ffdbd0c 2147335436 edx 0x7ffdbc8c 2147335308 ebx 0x7df8bc00 2113453056 esp 0x7ffdbc7c 0x7ffdbc7c ebp 0x329db0 0x329db0 esi 0x1821d10 25304336 edi 0x1731d10 24321296 eip 0x7efb5800 0x7efb5800 eflags 0x200216 [ PF AF IF ID ] cs 0x23 35 ss 0x2b 43 ds 0x2b 43 es 0x2b 43 fs 0x63 99 gs 0x6b 107 #0 0x7efb5800 in ?? () #1 <signal handler called> #2 0x7efb47e0 in ?? () #3 0xdeadbabe in ?? () #4 0x00329c3c in ?? () #5 0x00329970 in ?? () #6 0x0001003f in ?? () #7 0x00000000 in ?? ()
Breakpoint 5, 0x7efb4e40 in ?? () eax 0xb 11 ecx 0x7ffdbbfc 2147335164 edx 0x7ffdbb7c 2147335036 ebx 0x7df8bc00 2113453056 esp 0x7ffdbb6c 0x7ffdbb6c ebp 0x329d00 0x329d00 esi 0x18b0880 25888896 edi 0x17c0880 24905856 eip 0x7efb4e40 0x7efb4e40 eflags 0x200212 [ AF IF ID ] cs 0x23 35 ss 0x2b 43 ds 0x2b 43 es 0x2b 43 fs 0x63 99 gs 0x6b 107 #0 0x7efb4e40 in ?? () #1 <signal handler called> #2 0x7efb5800 in ?? () #3 <signal handler called> #4 0xf7549a4c in ?? () #5 0x7df379e7 in ?? () #6 0x017c0880 in ?? () #7 0x018b0880 in ?? () #8 0x00000458 in ?? () #9 0x00000000 in ?? () ^C Program exited with code 01. (gdb)
Here first executed segv_handler, which changes registers, esp - one of them. Next called usr1_handler, which interrupts segv_handler - you may see 0xdeadbabe in it's backtrace. First instruction of usr1_handler is "push ebp" - which tries to store ebp to stack, but stack pointer esp now invalid. This "push" generates another SIGSEGV - segv_handler called again and we get "nested exception on signal stack".