Proposed fix for cancellation bug found by Neal Ferguson.
Ulrich Drepper
drepper@redhat.com
Tue Sep 26 19:48:00 GMT 2000
Kaz Kylheku <kaz@ashi.footprints.net> writes:
> Because the test is delegated to the target thread, which allows its result
> to jive with the cancellation state. If the canceller makes the test,
> it opens the door for races, like: [...]
This is clear. The canceled thread must have it's tests. But the
thread calling pthread_cancel() can also do the test which is based on
the current state of the disable flag. If cancelation is disabled and
the call just returns this is the correct behavior.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
More information about the Libc-alpha
mailing list