This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Proposed fix for cancellation bug found by Neal Ferguson.


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   `------------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]