hanchenye-llvm-project/compiler-rt/lib/lsan
Sergey Matveev b029c5101f [ASan, LSan] Improve tracking of thread creation.
In the current scheme of things, the call to ThreadStart() in the child
thread is not synchronized with the parent thread. So, if a pointer is passed to
pthread_create, there may be a window of time during which this pointer will not
be discoverable by LSan. I.e. the pthread_create interceptor has already
returneed and thus the pointer is no longer on the parent stack, but we don't
yet know the location of the child stack. This has caused bogus leak reports
(see http://llvm.org/bugs/show_bug.cgi?id=21621/).

This patch makes the pthread_create interceptor wait until the child thread is
properly registered before returning.

llvm-svn: 223419
2014-12-05 00:10:15 +00:00
..
CMakeLists.txt [sanitizer] Android build cleanup. 2014-09-29 13:18:55 +00:00
Makefile.mk [LSan] Add support for building standalone LSan runtime to Make build (compiler-rt part) 2013-08-20 14:49:01 +00:00
lsan.cc [Sanitizer] Get rid of Symbolizer::Get() and Symbolizer::GetOrNull(). 2014-09-10 22:45:09 +00:00
lsan.h [Sanitizer] Make StackTrace a lightweight reference to array of PCs, and 2014-10-26 03:35:14 +00:00
lsan_allocator.cc Change StackDepot interface to use StackTrace more extensively 2014-10-26 06:23:07 +00:00
lsan_allocator.h [lsan] Implement the public allocator interface in standalone LSan. 2014-08-26 14:28:28 +00:00
lsan_common.cc Replace InternalScopedBuffer<char> with InternalScopedString where applicable. 2014-12-02 22:20:11 +00:00
lsan_common.h [LSan] Parse common flags from LSAN_OPTIONS even if LSan is combined with 2014-08-18 23:39:47 +00:00
lsan_common_linux.cc Change StackDepot interface to use StackTrace more extensively 2014-10-26 06:23:07 +00:00
lsan_interceptors.cc [ASan, LSan] Improve tracking of thread creation. 2014-12-05 00:10:15 +00:00
lsan_preinit.cc [Sanitizer] Introduce SANITIZER_CAN_USE_PREINIT_ARRAY definition and use it across sanitizers. 2014-07-25 22:05:02 +00:00
lsan_thread.cc [lsan] Support ASan's stack-use-after-return mode in LSan. 2013-10-14 14:04:50 +00:00
lsan_thread.h [lsan] Handle fork() correctly. 2013-07-08 12:57:24 +00:00