valgrind for WINE

Alexandre Julliard julliard at winehq.com
Fri Apr 4 10:09:07 CST 2003


Adam Gundy <arg at cyberscience.com> writes:

> I can currently produce this race (without my patch applied) by adding a "Sleep( 1000 )"
> to the USR1 signal handler in ntdll/signal_i386.c. The wineserver is convinced that the
> thread is suspended, but it isn't (sleeping is a bad example - assume that a context
> switch occurred, or heavy processing happened before the signal was delivered).

Not sure what you are trying to prove here; if the thread is inside
the SIGUSR1 handler then it is already suspended, it doesn't matter if
you sleep or not. What matters is how much code it runs before getting
the signal.

> this 'race' doesn't have ANY effect, because suspending a thread is not a precise operation -
> it doesn't matter whether 1 or 1000 instructions are executed by the
> thread before it stops.

It certainly matters if the thread never stops, which can easily
happen with your patch, since anything can happen to the thread that
was supposed to send the SIGUSR1.

-- 
Alexandre Julliard
julliard at winehq.com



More information about the wine-devel mailing list