diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-04-18 18:00:22 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-04-18 18:00:22 -0400 |
commit | 01d42747118522b7a486ece1736b93c6d5751344 (patch) | |
tree | e4f10b65d8335fcfc5f6c43a5e4a761619a47612 /src/thread | |
parent | fa80787698536ecd8b9028703a3bc2e3f59e3d65 (diff) | |
download | musl-01d42747118522b7a486ece1736b93c6d5751344.tar.gz musl-01d42747118522b7a486ece1736b93c6d5751344.tar.bz2 musl-01d42747118522b7a486ece1736b93c6d5751344.tar.xz musl-01d42747118522b7a486ece1736b93c6d5751344.zip |
make dlerror state and message thread-local and dynamically-allocated
this fixes truncation of error messages containing long pathnames or
symbol names.
the dlerror state was previously required by POSIX to be global. the
resolution of bug 97 relaxed the requirements to allow thread-safe
implementations of dlerror with thread-local state and message buffer.
Diffstat (limited to 'src/thread')
-rw-r--r-- | src/thread/pthread_create.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c index 6963f0d6..d7c0323a 100644 --- a/src/thread/pthread_create.c +++ b/src/thread/pthread_create.c @@ -17,6 +17,7 @@ weak_alias(dummy_0, __acquire_ptc); weak_alias(dummy_0, __release_ptc); weak_alias(dummy_0, __pthread_tsd_run_dtors); weak_alias(dummy_0, __do_orphaned_stdio_locks); +weak_alias(dummy_0, __dl_thread_cleanup); _Noreturn void __pthread_exit(void *result) { @@ -92,6 +93,7 @@ _Noreturn void __pthread_exit(void *result) __vm_unlock(); __do_orphaned_stdio_locks(); + __dl_thread_cleanup(); if (self->detached && self->map_base) { /* Detached threads must avoid the kernel clear_child_tid |