summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorMitch Phillips <mitchphillips@outlook.com>2019-05-30 19:45:32 +0000
committerMitch Phillips <mitchphillips@outlook.com>2019-05-30 19:45:32 +0000
commit7d5568e56bd8b9227e14501be82a490d5245c718 (patch)
treef0abb17ae465d4312dfb95d1a2da0bbfe33cfbe2 /runtime
parentcfea492dda1f29d54d1078211f31406422137341 (diff)
downloadclang-7d5568e56bd8b9227e14501be82a490d5245c718.tar.gz
[GWP-ASan] Mutex implementation [2].
Summary: See D60593 for further information. This patch pulls out the mutex implementation and the required definitions file. We implement our own mutex for GWP-ASan currently, because: 1. We must be compatible with the sum of the most restrictive elements of the supporting allocator's build system. Current targets for GWP-ASan include Scudo (on Linux and Fuchsia), and bionic (on Android). 2. Scudo specifies `-nostdlib++ -nonodefaultlibs`, meaning we can't use `std::mutex` or `mtx_t`. 3. We can't use `sanitizer_common`'s mutex, as the supporting allocators cannot afford the extra maintenance (Android, Fuchsia) and code size (Fuchsia) overheads that this would incur. In future, we would like to implement a shared base mutex for GWP-ASan, Scudo and sanitizer_common. This will likely happen when both GWP-ASan and Scudo standalone are not in the development phase, at which point they will have stable requirements. Reviewers: vlad.tsyrklevich, morehouse, jfb Reviewed By: morehouse Subscribers: dexonsmith, srhines, cfe-commits, kubamracek, mgorny, cryptoad, jfb, #sanitizers, llvm-commits, vitalybuka, eugenis Tags: #sanitizers, #llvm, #clang Differential Revision: https://reviews.llvm.org/D61923 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362138 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime')
-rw-r--r--runtime/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index e1e52b0e45..e20cc26f60 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -132,7 +132,7 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
# Add top-level targets for various compiler-rt test suites.
set(COMPILER_RT_TEST_SUITES check-fuzzer check-asan check-hwasan check-asan-dynamic check-dfsan
check-lsan check-msan check-sanitizer check-tsan check-ubsan check-ubsan-minimal
- check-profile check-cfi check-cfi-and-supported check-safestack)
+ check-profile check-cfi check-cfi-and-supported check-safestack check-gwp_asan)
foreach(test_suite ${COMPILER_RT_TEST_SUITES})
get_ext_project_build_command(run_test_suite ${test_suite})
add_custom_target(${test_suite}