http://bugs.winehq.org/show_bug.cgi?id=20380
--- Comment #76 from Michael Builov mbuilov@gmail.com 2010-02-13 20:03:47 --- (In reply to comment #74) sorry, i made errors in my test program (sig_test.c) Instead of getpid() and kill() i had to use gettid() and tkill(). Here they are:
#include <sys/syscall.h> typedef int tid_t;
static tid_t gettid(void) { tid_t tid = (tid_t)syscall(SYS_gettid); return tid; }
static int tkill(tid_t tid, int sig) { int err = syscall(SYS_tkill, tid, sig); return err; }
With gettid() and tkill() the test completed successfully.
So send_thread_signal() in wine-1.1.38/server/ptrace.c should work properly. And so may be i was wrong about "segv_handler was interrupted by usr1_handler". But backtrace of faulted usr1_handler looks very strange:
#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 ?? ()
i found that "0xdeadbabe" number used in wine-1.1.38/dlls/ntdll/signal_i386.c:setup_exception_record() so very likely that wine has corrupted the stack, not Homm3.