Konstantin Belousov bd43f0691c If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols
do not participate in the global symbols namespace, but rtld locks are
still replaced and functions are interposed.  In particular,
__pthread_map_stacks_exec is resolved to the libc version.  If a
library is loaded later, which requires adjustment of the stack
protection mode, rtld calls into libc __pthread_map_stacks_exec due to
the symbols scope.  The libc version might recurse into binder and
recursively acquire rtld bind lock, causing the hang.

Make libc __pthread_map_stacks_exec() interposed, which synchronizes
rtld locks and version of the stack exec hook when libthr loaded,
regardless of the symbol scope control or symbol resolution order.

The __pthread_map_stacks_exec() symbol is removed from the private
version in libthr since libc symbol now operates correctly in presence
of libthr.

Reported and tested by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-02-08 19:24:13 +00:00
..
2011-11-26 16:49:25 +00:00
2012-08-11 12:07:24 +00:00
2011-10-01 12:19:48 +00:00
2011-10-01 12:19:48 +00:00
2015-09-20 20:21:49 +00:00
2013-08-18 13:25:18 +00:00
2015-09-20 20:21:49 +00:00
2012-04-26 19:21:58 +00:00
2011-05-25 14:13:53 +00:00
2015-09-20 20:21:49 +00:00
2015-02-15 21:11:07 +00:00
2015-09-14 18:44:13 +00:00
2015-09-14 18:44:13 +00:00
2015-04-26 10:29:43 +00:00
2011-12-20 22:56:13 +00:00
2015-12-20 11:55:39 +00:00
2015-04-26 10:56:06 +00:00
2015-04-26 10:52:37 +00:00
2015-04-26 10:52:37 +00:00
2015-04-26 10:52:37 +00:00
2015-04-26 10:52:37 +00:00
2015-04-26 10:52:37 +00:00
2015-04-26 10:52:37 +00:00
2015-04-26 10:52:37 +00:00
2015-04-26 10:52:37 +00:00
2015-04-26 10:52:37 +00:00
2012-03-26 15:18:14 +00:00
2011-02-04 16:40:50 +00:00
2015-09-20 20:21:49 +00:00
2013-04-23 13:03:03 +00:00
2012-12-12 15:27:33 +00:00
2015-02-17 16:01:00 +00:00
2015-09-20 20:21:49 +00:00
2015-09-20 20:21:49 +00:00
2015-09-20 20:21:49 +00:00
2015-09-20 20:21:49 +00:00
2015-09-20 20:21:49 +00:00
2015-09-20 20:21:49 +00:00