mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
BZ #12310: pthread_exit in static app. segfaults
Static applications that call pthread_exit on the main thread segfault. This is because after a thread terminates __libc_start_main decrements __nptl_nthreads which is only defined in pthread_create. Therefore the right solution is to add a requirement to pthread_create from pthread_exit. ~~~ nptl/ 2013-06-24 Vladimir Nikulichev <v.nikulichev@gmail.com> [BZ #12310] * pthread_exit.c: Add reference to pthread_create.
This commit is contained in:
committed by
Carlos O'Donell
parent
2f063a6e84
commit
e1f0b2cfa1
@ -29,3 +29,7 @@ __pthread_exit (value)
|
||||
__do_cancel ();
|
||||
}
|
||||
strong_alias (__pthread_exit, pthread_exit)
|
||||
|
||||
/* After a thread terminates, __libc_start_main decrements
|
||||
__nptl_nthreads defined in pthread_create.c. */
|
||||
PTHREAD_STATIC_FN_REQUIRE (pthread_create)
|
||||
|
Reference in New Issue
Block a user