diff options
author | kib <kib@FreeBSD.org> | 2011-01-09 12:38:40 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2011-01-09 12:38:40 +0000 |
commit | b2e3ee7d07d38a011d50e0ce65fe146aafb5c939 (patch) | |
tree | 3e9a8bc61608f36b6d941a6fe4ca52880cc1c222 /lib/libthr/pthread.map | |
parent | 13fb4c75946c522dc61a068915f8ebe021d256c7 (diff) | |
download | FreeBSD-src-b2e3ee7d07d38a011d50e0ce65fe146aafb5c939.zip FreeBSD-src-b2e3ee7d07d38a011d50e0ce65fe146aafb5c939.tar.gz |
Implement the __pthread_map_stacks_exec() for libthr.
Stack creation code is changed to call _rtld_get_stack_prot() to get
the stack protection right. There is a race where thread is created
during dlopen() of dso that requires executable stacks. Then,
_rtld_get_stack_prot() may return PROT_READ | PROT_WRITE, but thread
is still not linked into the thread list. In this case, the callback
misses the thread stack, and rechecks the required protection
afterward.
Reviewed by: davidxu
Diffstat (limited to 'lib/libthr/pthread.map')
-rw-r--r-- | lib/libthr/pthread.map | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libthr/pthread.map b/lib/libthr/pthread.map index 5e36239..9f82a1b 100644 --- a/lib/libthr/pthread.map +++ b/lib/libthr/pthread.map @@ -382,6 +382,8 @@ FBSDprivate_1.0 { _thread_size_key; _thread_state_running; _thread_state_zoombie; + + __pthread_map_stacks_exec; }; FBSD_1.1 { |