Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Apr 2005 00:34:16 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        David Xu <davidxu@freebsd.org>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: Bug with pthread_getspecific() and signals
Message-ID:  <Pine.GSO.4.43.0504180031070.26675-100000@sea.ntplx.net>
In-Reply-To: <4263095F.3040102@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 18 Apr 2005, David Xu wrote:
> Archie Cobbs wrote:
>
> > On FreeBSD 4.9 I'm seeing a bug where pthread_getspecific() sometimes
> > returns the wrong value when invoked from within a signal handler.
> >
> > ISTR this bug was fixed in a later version of FreeBSD. However, I can't
> > seem to find any reference to the bug, any information about when
> > it was fixed, etc. (FreeBSD's mailing list search ability doesn't
> > help much).
> >
> > If anyone knows any more details about this bug I'd appreciate knowing
> > any more details.
>
> Does POSIX say that pthread_getspecific can be used in signal handler ?

I don't think using it in a signal handler should cause a problem
for our implementation though.  Probably the real problem is that
the signal handler is not running in the expected thread.  I'd
double check the signal masks and make sure there is only one
thread that could possibly handle the signal.

-- 
DE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0504180031070.26675-100000>