This is the mail archive of the
mailing list for the glibc project.
[Bug nptl/21031] New: pthread_key_delete() race with thread finalization
- From: "leo at yuriev dot ru" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 07 Jan 2017 19:29:09 +0000
- Subject: [Bug nptl/21031] New: pthread_key_delete() race with thread finalization
- Auto-submitted: auto-generated
Bug ID: 21031
Summary: pthread_key_delete() race with thread finalization
Assignee: unassigned at sourceware dot org
Reporter: leo at yuriev dot ru
CC: drepper.fsp at gmail dot com
Target Milestone: ---
A race condition could occur between the pthread_key_delete() and the
For instance, __nptl_deallocate_tsd() could call a destructor for the key,
immediately before the pthread_key_delete() invalidates it (from an another
thread), and will continue destructor execution after the completion of
>From a user code this looks as if the corresponding destructor executes after
the key has been removed by pthread_key_delete(), and there is no way to know
whether was destructor called/executed or not.
Suggest add pthread_rwlock_rdlock() for __nptl_deallocate_tsd() and
pthread_rwlock_wrlock() for pthread_key_delete().
You are receiving this mail because:
You are on the CC list for the bug.