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: Ulrich Drepper <drepper at cygnus dot com>
- Subject: Re: Proposed fix for cancellation bug found by Neal Ferguson.
- From: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Date: Tue, 26 Sep 2000 17:49:11 -0700 (PDT)
- cc: libc-alpha at sources dot redhat dot com
On 26 Sep 2000, Ulrich Drepper wrote:
> Date: 26 Sep 2000 17:05:59 -0700
> From: Ulrich Drepper <drepper@redhat.com>
> Reply-To: Ulrich Drepper <drepper@cygnus.com>
> To: Kaz Kylheku <kaz@ashi.footprints.net>
> Cc: libc-alpha@sources.redhat.com
> Subject: 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
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.