forked from OSchip/llvm-project
984f42eed5
There is possible deadlock in dynamic ASan runtime when we dlopen() shared lib which creates a thread at the global initialization stage. The scenario: 1) dlopen grabs a GI_pthread_mutex_lock in main thread. 2) main thread calls pthread_create, ASan intercepts it, calls real pthread_create and waits for the second thread to be "fully initialized". 3) Newly created thread tries to access a thread local disable_counter in LSan (to complete its "full initialization") and hangs in tls_get_addr_tail, because it also tries to acquire GI_pthread_mutex_lock. The issue is reproducible on relative recent Glibc versions e.g. 2.23. Differential Revision: https://reviews.llvm.org/D26028 llvm-svn: 285385 |
||
---|---|---|
.. | ||
.clang-format | ||
CMakeLists.txt | ||
lsan.cc | ||
lsan.h | ||
lsan_allocator.cc | ||
lsan_allocator.h | ||
lsan_common.cc | ||
lsan_common.h | ||
lsan_common_linux.cc | ||
lsan_flags.inc | ||
lsan_interceptors.cc | ||
lsan_preinit.cc | ||
lsan_thread.cc | ||
lsan_thread.h |