llvm-project/compiler-rt/lib
Jianzhou Zhao 0f3fd3b281 [dfsan] Add thread registration
This is a part of https://reviews.llvm.org/D95835.

This change is to address two problems
1) When recording stacks in origin tracking, libunwind is not async signal safe. Inside signal callbacks, we need
to use fast unwind. Fast unwind needs threads
2) StackDepot used by origin tracking is not async signal safe, we set a flag per thread inside
a signal callback to prevent from using it.

The thread registration is similar to ASan and MSan.

Related MSan changes are
* 98f5ea0dba
* f653cda269
* 5a7c364343

Some changes in the diff are used in the next diffs
1) The test case pthread.c is not very interesting for now. It will be
  extended to test origin tracking later.
2) DFsanThread::InSignalHandler will be used by origin tracking later.

Reviewed-by: morehouse

Differential Revision: https://reviews.llvm.org/D95963
2021-02-05 17:38:59 +00:00
..
BlocksRuntime
asan [asan] Fix pthread_create interceptor 2021-02-03 12:57:56 -08:00
builtins [compiler-rt] Fix AArch64 out-of-line atomics visibility on mach-o 2021-02-01 11:29:20 -05:00
cfi [sanitizers] Remove unneeded MaybeCall*DefaultOptions() and nullptr checks 2020-09-08 10:12:05 -07:00
crt [RISCV][crt] support building without init_array 2020-12-01 17:17:50 +03:00
dfsan [dfsan] Add thread registration 2021-02-05 17:38:59 +00:00
fuzzer [compiler-rt] FuzzedDataProvider: Add PickValueInArray for std::array 2020-12-30 10:25:26 -08:00
gwp_asan [gwp_asan] Use zx_system_get_page_size() on Fuchsia 2021-02-03 10:35:07 -08:00
hwasan Revert "Hwasan InitPrctl check for error using internal_iserror" 2021-01-13 08:30:11 -05:00
interception [sanitizer] Define SANITIZER_GLIBC to refine SANITIZER_LINUX feature detection and support musl 2021-01-06 10:55:40 -08:00
lsan [LSan][RISCV] Enable LSan for RISCV64 2021-01-31 21:53:25 +00:00
memprof [asan][memprof] Declare _DYNAMIC and fix -Wparentheses 2020-12-27 20:28:59 -08:00
msan [sanitizer] Fix msan test build on FreeBSD after 7afdc89c20 2021-01-28 23:54:04 +01:00
profile [compiler-rt] [profile] Silence a warning about an unused function on mingw targets 2020-11-21 22:14:35 +02:00
safestack compiler-rt: Rename .cc file in lib/{interception/tests,safestack} to .cpp 2019-08-01 13:56:52 +00:00
sanitizer_common [Darwin] Switch to new logging api for sanitizers 2021-02-04 21:04:51 -08:00
scudo [scudo/standalone] Use zx_system_get_page_size() on Fuchsia 2021-02-03 10:28:05 -08:00
stats compiler-rt: Rename .cc file in lib/{dfsan,stats,ubsan_minimal} to .cpp 2019-08-01 12:41:23 +00:00
tsan [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
ubsan [compiler-rt] [ubsan] Use the itanium type info lookup for mingw targets 2020-11-03 09:59:08 +02:00
ubsan_minimal [compiler-rt] Suppress -Wunused-result due to ::write when _FORTIFY_SOURCE>0 in glibc 2020-10-12 09:57:12 -07:00
xray [XRay] Remove unnecessary <x86intrin.h> include 2020-12-14 12:36:35 +02:00
CMakeLists.txt [MemProf] Decouple memprof build from COMPILER_RT_BUILD_SANITIZERS 2020-10-26 13:52:50 -07:00