hanchenye-llvm-project/compiler-rt/lib/lsan
Kamil Rytarowski 20e97ae9a0 Detect thread termination in LSan/NetBSD
Summary:
Stop using the Linux solution with pthread_key_create(3).
This approach does not work on NetBSD, because calling
the thread destructor is not the latest operation on a POSIX
thread entity.

Detect _lwp_exit(2) call as it is really the latest operation
called from a detaching POSIX thread.

The pthread_key_create(3) solution also cannot be used
in early libc/libpthread initialization on NetBSD as the
system libraries are not bootstrapped enough.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka, kcc, dvyukov

Reviewed By: dvyukov

Subscribers: llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D40457

llvm-svn: 318994
2017-11-26 09:42:01 +00:00
..
.clang-format
CMakeLists.txt Support compiler-rt builtins 2017-07-28 03:39:38 +00:00
lsan.cc [sanitizers] Rename GetStackTraceWithPcBpAndContext 2017-11-09 07:53:06 +00:00
lsan.h [LSan] Export __lsan_init 2017-11-15 23:42:48 +00:00
lsan_allocator.cc [Sanitizers] ASan/MSan/LSan allocators set errno on failure. 2017-07-18 19:11:04 +00:00
lsan_allocator.h [LSan] Adjust LSan allocator limits for PPC64. 2017-10-26 01:22:48 +00:00
lsan_common.cc [lsan] Remove semicolon after do {} while (0) 2017-11-13 20:59:26 +00:00
lsan_common.h Fix some typos in a comment. 2017-11-15 21:19:20 +00:00
lsan_common_linux.cc [LSan] Detect dynamic loader by its base address. 2017-11-06 21:27:06 +00:00
lsan_common_mac.cc Only scan global sections containing data in LSan on darwin 2017-07-25 18:16:58 +00:00
lsan_flags.inc Implement tls scanning for darwin LSan 2017-05-25 17:41:13 +00:00
lsan_interceptors.cc Detect thread termination in LSan/NetBSD 2017-11-26 09:42:01 +00:00
lsan_linux.cc Implement standalone lsan interceptors for OS X 2017-04-11 20:05:02 +00:00
lsan_mac.cc Add lsan interceptors for libdispatch functions on darwin 2017-06-19 19:21:31 +00:00
lsan_malloc_mac.cc Implement standalone lsan interceptors for OS X 2017-04-11 20:05:02 +00:00
lsan_preinit.cc
lsan_thread.cc Add lsan interceptors for libdispatch functions on darwin 2017-06-19 19:21:31 +00:00
lsan_thread.h Add lsan interceptors for libdispatch functions on darwin 2017-06-19 19:21:31 +00:00
weak_symbols.txt [lsan] Add __lsan_default_options 2017-09-22 23:49:49 +00:00