This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/21032] New: pthread_key_create() destructors and DSO unloading
- From: "leo at yuriev dot ru" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 07 Jan 2017 20:14:33 +0000
- Subject: [Bug nptl/21032] New: pthread_key_create() destructors and DSO unloading
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=21032
Bug ID: 21032
Summary: pthread_key_create() destructors and DSO unloading
Product: glibc
Version: 2.24
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: nptl
Assignee: unassigned at sourceware dot org
Reporter: leo at yuriev dot ru
CC: drepper.fsp at gmail dot com
Target Milestone: ---
The pthread_key_create() and __nptl_deallocate_tsd() do not track the
references to destructor's DSO like the __cxa_thread_atexit_impl().
Therefore the DSO, which holds a destructor's code, could be unloaded before
destructor execution or before deleting a corresponding key.
So in a complex environment there is no way to know whether it is safe to
unload a particular DSO or some tls-destructors are still left.
Suggest this should be fixed or documented, e.g. that the pthread_create_key()
with a destructor should not be used from lib.so.
--
You are receiving this mail because:
You are on the CC list for the bug.