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:

>   /* Only store a non-null peif if the thread has cancellation enabled. 
>      Otherwise pthread_cancel will unconditionally call the extricate handler,
>      and restart the thread giving rise to forbidden spurious wakeups. */
> [...]
> How is that?

I think it is only problematic if the user does something forbidden
(like setting the cancelation state in an interrupt handler).  In this
case a waiting thread (which would have set a extrication handler
before) sets none, waits, the signal handler makes the thread
cancelable, and another thread comes by and cancels it without the
extrication handler being used.  But I can live with that.

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