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:

> It happens *always* whenever a thread disables its cancellation and
> then executes waits during which someone calls pthread_cancel on
> it. E.g.  create a thread, have it disable cancellation and call
> pthread_join(), then cancel that thread.  Spurious wakeup.  No
> signals involved.

Well, this is one thing I asked myself when looking at the code.  Why
isn't pthread_cancel simply returning if the cancelation state of the
thread is PTHREAD_CANCEL_DISABLE?  It seems to make no sense to not to
this test.

-- 
---------------.                          ,-.   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]