forked from OSchip/llvm-project
![]() We set in_blocking_func around some blocking C functions so that we don't delay signal infinitely (if in_blocking_func is set we deliver signals synchronously). However, pthread_join is blocking but also call munmap/free to free thread resources. If we are inside the munmap/free interceptors called from pthread_join and deliver a signal synchronously, it can lead to deadlocks and crashes since we re-enter runtime and try to lock the same mutexes or use the same per-thread data structures. If we re-enter runtime via an interceptor when in_blocking_func is set, temporary reset in_blocking_func around the interceptor and restore it back when we return from the recursive interceptor. Also move in_blocking_func from ThreadSignalContext to ThreadContext so that we can CHECK that it's not set in SlotLocker ctor. Fixes https://github.com/google/sanitizers/issues/1540 Reviewed By: melver Differential Revision: https://reviews.llvm.org/D127845 |
||
---|---|---|
.. | ||
cmake | ||
docs | ||
include | ||
lib | ||
test | ||
tools | ||
unittests | ||
utils | ||
www | ||
.clang-tidy | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.TXT | ||
CREDITS.TXT | ||
LICENSE.TXT | ||
README.txt |
README.txt
Compiler-RT ================================ This directory and its subdirectories contain source code for the compiler support routines. Compiler-RT is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt. ================================