llvm-project/compiler-rt/lib
Evgeniy Stepanov 4f0e10fff9 [hwasan] Add a (almost) no-interceptor mode.
Summary:
The idea behind this change is to allow sanitization of libc. We are prototyping on Bionic,
but the tool interface will be general enough (or at least generalizable) to support any other libc.

When libc depends on libclang_rt.hwasan, the latter can not interpose libc functions.
In fact, majority of interceptors become unnecessary when libc code is instrumented.

This change gets rid of most hwasan interceptors and provides interface for libc to notify
hwasan about thread creation and destruction events. Some interceptors (pthread_create)
are kept under #ifdef to enable testing with uninstrumented libc. They are expressed in
terms of the new libc interface.

The new cmake switch, COMPILER_RT_HWASAN_WITH_INTERCEPTORS, ON by default, builds testing
version of the library with the aforementioned pthread_create interceptor.
With the OFF setting, the library becomes more of a libc plugin.

Reviewers: vitalybuka, kcc, jfb

Subscribers: srhines, kubamracek, mgorny, jfb, llvm-commits

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

llvm-svn: 340216
2018-08-20 21:49:15 +00:00
..
BlocksRuntime [compiler-rt] Test commit: remove some trailing white spaces. 2017-08-25 19:36:30 +00:00
asan Add header guard to asan_report.h 2018-08-02 11:05:07 +00:00
builtins [macOS] stop generating the libclang_rt.10.4.a library for macOS 10.4 2018-08-08 17:29:55 +00:00
cfi cfi: Remove blacklist entries for libc++. 2018-08-15 18:05:55 +00:00
dfsan sanitizers: consistently check result of MmapFixedNoReserve 2018-07-20 08:33:41 +00:00
esan esan: fix shadow setup 2018-07-20 13:40:08 +00:00
fuzzer Revert "[libFuzzer] Use std::discrete_distribution for input selection." 2018-08-17 01:30:27 +00:00
hwasan [hwasan] Add a (almost) no-interceptor mode. 2018-08-20 21:49:15 +00:00
interception [CMake] Add compiler-rt header files to the list of sources for targets 2018-07-10 13:00:17 +00:00
lsan [CMake] Add compiler-rt header files to the list of sources for targets 2018-07-10 13:00:17 +00:00
msan [hwasan] Provide __sanitizer_* aliases to allocator functions. 2018-08-13 21:07:27 +00:00
profile [compiler-rt] Add a routine to specify the mode used when creating profile dirs. 2018-07-31 23:37:24 +00:00
safestack Reland "SafeStack: Delay thread stack clean-up"" 2018-08-14 20:28:58 +00:00
sanitizer_common [sanitizer] Use private futex operations for BlockingMutex 2018-08-20 14:57:58 +00:00
scudo [scudo] Fix race condition in deallocation path when Quarantine is bypassed 2018-08-14 18:34:52 +00:00
stats [CMake] Add compiler-rt header files to the list of sources for targets 2018-07-10 13:00:17 +00:00
tsan [tsan] Fix gcc pedantic warning 2018-07-26 13:02:54 +00:00
ubsan [compiler-rt][ubsan] Implicit Conversion Sanitizer - integer truncation - compiler-rt part 2018-07-30 18:58:30 +00:00
ubsan_minimal [compiler-rt][ubsan] Implicit Conversion Sanitizer - integer truncation - compiler-rt part 2018-07-30 18:58:30 +00:00
xray [XRay][compiler-rt] Avoid InternalAlloc(...) in Profiling Mode 2018-08-17 01:57:42 +00:00
CMakeLists.txt [cmake] Add a separate CMake var to control profile runtime 2017-10-02 05:03:55 +00:00