diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2019-05-03 18:20:16 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2019-05-03 18:20:16 +0000 |
commit | 3c314782f4872a7437893ecbb45452c89419b87d (patch) | |
tree | 0e900c8bdc5aec72f1eaef9a92ef7989996ba041 /lib/hwasan | |
parent | 44fe7bd86bf7fc305d7eca3ba778b6d7f663a6b5 (diff) | |
download | compiler-rt-3c314782f4872a7437893ecbb45452c89419b87d.tar.gz |
[hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android.
Summary:
I'm not aware of any platforms where this will work, but the code should at least compile.
HWASAN_WITH_INTERCEPTORS=OFF means there is magic in libc that would call __hwasan_thread_enter /
__hwasan_thread_exit as appropriate.
Reviewers: pcc, winksaville
Subscribers: srhines, kubamracek, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D61337
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/hwasan')
-rw-r--r-- | lib/hwasan/hwasan_linux.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/hwasan/hwasan_linux.cpp b/lib/hwasan/hwasan_linux.cpp index 927eed54a..d93297648 100644 --- a/lib/hwasan/hwasan_linux.cpp +++ b/lib/hwasan/hwasan_linux.cpp @@ -38,7 +38,17 @@ #include "sanitizer_common/sanitizer_common.h" #include "sanitizer_common/sanitizer_procmaps.h" -#if HWASAN_WITH_INTERCEPTORS && !SANITIZER_ANDROID +// Configurations of HWASAN_WITH_INTERCEPTORS and SANITIZER_ANDROID. +// +// HWASAN_WITH_INTERCEPTORS=OFF, SANITIZER_ANDROID=OFF +// Not currently tested. +// HWASAN_WITH_INTERCEPTORS=OFF, SANITIZER_ANDROID=ON +// Integration tests downstream exist. +// HWASAN_WITH_INTERCEPTORS=ON, SANITIZER_ANDROID=OFF +// Tested with check-hwasan on x86_64-linux. +// HWASAN_WITH_INTERCEPTORS=ON, SANITIZER_ANDROID=ON +// Tested with check-hwasan on aarch64-linux-android. +#if !SANITIZER_ANDROID SANITIZER_INTERFACE_ATTRIBUTE THREADLOCAL uptr __hwasan_tls; #endif |