public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug linuxthreads/373] New: pthread_key_delete does not NULL key values prior to pthread_create
@ 2004-09-08 21:09 bugzilla at merlin dot org
  2004-09-08 21:12 ` [Bug linuxthreads/373] " bugzilla at merlin dot org
  2004-09-09 16:36 ` gotom at debian dot or dot jp
  0 siblings, 2 replies; 3+ messages in thread
From: bugzilla at merlin dot org @ 2004-09-08 21:09 UTC (permalink / raw)
  To: glibc-bugs

Normally pthread_key_create should return a new key with NULL values.
LinuxThreads relies on pthread_key_delete to NULL the key value in order to
achieve this. However it does not do this in an application prior to
pthread_create being called, so if an app does: pthread_key_create() ...
pthread_setspecific(non-null) ... pthread_key_delete() ... pthread_key_create()
then the new key will have the old non-null value.

I'm not familiar enough with POSIX to know if this behaviour is acceptable, but
it is annoying in an app where threads are sometimes not created for some time.

Linux 2.4.25/i386/glibc 2.3.2/LinuxThreads-0.10

-- 
           Summary: pthread_key_delete does not NULL key values prior to
                    pthread_create
           Product: glibc
           Version: 2.3.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: linuxthreads
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: bugzilla at merlin dot org
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=373

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug linuxthreads/373] pthread_key_delete does not NULL key values prior to pthread_create
  2004-09-08 21:09 [Bug linuxthreads/373] New: pthread_key_delete does not NULL key values prior to pthread_create bugzilla at merlin dot org
@ 2004-09-08 21:12 ` bugzilla at merlin dot org
  2004-09-09 16:36 ` gotom at debian dot or dot jp
  1 sibling, 0 replies; 3+ messages in thread
From: bugzilla at merlin dot org @ 2004-09-08 21:12 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From bugzilla at merlin dot org  2004-09-08 21:12 -------
Created an attachment (id=188)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=188&action=view)
demonstration of pthread_key_create/delete issue

Compile: gcc -pthread a.c -lpthread
Run: ./a.out

As printed, the initial key value is non-NULL for a reused key that was deleted
prior to invoking pthread_create().

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=373

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug linuxthreads/373] pthread_key_delete does not NULL key values prior to pthread_create
  2004-09-08 21:09 [Bug linuxthreads/373] New: pthread_key_delete does not NULL key values prior to pthread_create bugzilla at merlin dot org
  2004-09-08 21:12 ` [Bug linuxthreads/373] " bugzilla at merlin dot org
@ 2004-09-09 16:36 ` gotom at debian dot or dot jp
  1 sibling, 0 replies; 3+ messages in thread
From: gotom at debian dot or dot jp @ 2004-09-09 16:36 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From gotom at debian dot or dot jp  2004-09-09 16:36 -------
It's already fixed in NPTL.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://sources.redhat.com/bugzilla/show_bug.cgi?id=373

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-09 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-08 21:09 [Bug linuxthreads/373] New: pthread_key_delete does not NULL key values prior to pthread_create bugzilla at merlin dot org
2004-09-08 21:12 ` [Bug linuxthreads/373] " bugzilla at merlin dot org
2004-09-09 16:36 ` gotom at debian dot or dot jp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).