wineserver fix

Andreas Mohr a.mohr at mailto.de
Tue Aug 7 04:10:28 CDT 2001


Hi all,

an installation program I was debugging had one of its wine processes
crash, and the familiar "please set up debugger" message appeared.
I thought "forget it" and did a killall wine.
Boy, was I astonished when I found that this managed to kill wineserver :-)
(socket file left behind)

crash trace:

wake_up()
  wake_thread()
    for loop in wake_thread():
    send_thread_wakeup(), EPIPE (!) (due to "killall wine"):
      kill_thread()
        release_object( thread );
          obj->ops->destroy( obj );
            destroy_thread(); --> leave (#13)
    -- next for loop iteration in wake_thread --
    check_wait( thread )
      if (wait->flags & SELECT_ALL) /* BOOM !! wait == 0xaaaaaaaa, mem dbg fill ? */

break;ing on a problematic send_thread_wakeup return value in wake_thread
fixes the crash.

-- 
Andreas Mohr                        Stauferstr. 6, D-71272 Renningen, Germany
Tel. +49 7159 800604                http://home.nexgo.de/andi.mohr/
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at rhlx01.fht-esslingen.de:/home/wine
Index: server/thread.c
===================================================================
RCS file: /home/wine/wine/server/thread.c,v
retrieving revision 1.66
diff -u -r1.66 thread.c
--- server/thread.c	12 Jul 2001 22:35:20 -0000	1.66
+++ server/thread.c	7 Aug 2001 09:04:00 -0000
@@ -440,7 +440,8 @@
         if (debug_level) fprintf( stderr, "%08x: *wakeup* signaled=%d cookie=%p\n",
                                   (unsigned int)thread, signaled, cookie );
         end_wait( thread );
-        send_thread_wakeup( thread, cookie, signaled );
+        if (send_thread_wakeup( thread, cookie, signaled ) == -1) /* error */
+	    break;
     }
     return count;
 }


More information about the wine-patches mailing list