This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Proposed fix for cancellation bug found by Neal Ferguson.
- To: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Subject: Re: Proposed fix for cancellation bug found by Neal Ferguson.
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 26 Sep 2000 19:48:04 -0700
- Cc: libc-alpha at sources dot redhat dot com
- References: <Pine.LNX.4.10.10009261923000.19880-100000@ashi.FootPrints.net>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
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 `------------------------