freebsd-dev/libexec/rtld-elf
Konstantin Belousov e91ff25c0c Fix the problem with the C++ exception handling for the multithreaded
programs.

From the PR description:
The gcc runtime's _Unwind_Find_FDE function, invoked during exception
handling's stack unwinding, is not safe to execute from within multiple
threads. FreeBSD' s dl_iterate_phdr() however permits multiple threads
to pass through it though. The result is surprisingly reliable infinite
looping of one or more threads if they just happen to be unwinding at
the same time.

Introduce the new lock that is write locked around the dl_iterate_pdr,
thus providing required exclusion for the stack unwinders.

PR:	threads/123062
Submitted by:	Andy Newman <an at atrn org>
Reviewed by:	kan
MFC after:	2 weeks
2008-05-06 09:27:41 +00:00
..
amd64 *thwack*! all the world's not i386. 2006-03-29 12:29:01 +00:00
arm Implement ELF symbol versioning using GNU semantics. This code aims 2005-12-18 19:43:33 +00:00
i386 Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
ia64 We don't need --export-dynamic for ld-elf.so.1, because it's a 2007-05-16 23:19:51 +00:00
mips MFp4: Add mips support for dynamic linking. 2008-04-04 20:59:26 +00:00
powerpc Include an extra header to get a function prototype. 2007-11-19 08:58:11 +00:00
sparc64 For un-prototyped static inline functions declared in pthread_md.h on 2007-12-01 14:24:44 +00:00
debug.c Fix warnings on 64 bit platforms. 2003-06-19 16:09:18 +00:00
debug.h Use C99's varadic macro syntax instead of gcc's. 2006-03-28 18:26:47 +00:00
libmap.c Fix a malloc overrun in 32-bit compat libmap lookup code. 2006-01-31 06:08:28 +00:00
libmap.h Description from Dan: 2005-02-04 02:46:41 +00:00
Makefile Don't enable symbol versioning on ia64 for now. It causes 2007-05-16 23:24:15 +00:00
malloc.c In preparation for a new malloc implementation: 2006-01-12 07:28:21 +00:00
map_object.c Implement dl_iterate_phdr function. 2007-04-03 18:31:20 +00:00
rtld_lock.c Fix the problem with the C++ exception handling for the multithreaded 2008-05-06 09:27:41 +00:00
rtld_lock.h Fix the problem with the C++ exception handling for the multithreaded 2008-05-06 09:27:41 +00:00
rtld_tls.h Add support for Thread Local Storage. 2004-08-03 08:51:00 +00:00
rtld.1 Update the man page to reflect that certain variables will be unset in 2007-05-17 19:14:25 +00:00
rtld.c Fix the problem with the C++ exception handling for the multithreaded 2008-05-06 09:27:41 +00:00
rtld.h MFp4: Add mips support for dynamic linking. 2008-04-04 20:59:26 +00:00
Symbol.map Add r_debug_state to the list of symbols exported from rtld. GDB needs to 2007-07-11 23:07:37 +00:00
xmalloc.c Add function prototypes. 2003-06-19 05:28:26 +00:00