[compiler-rt] r359914 - [hwasan] Fix HWASAN_WITH_INTERCEPTORS=OFF build on not-android.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Fri May 3 11:20:17 PDT 2019
Author: eugenis
Date: Fri May 3 11:20:16 2019
New Revision: 359914
URL: http://llvm.org/viewvc/llvm-project?rev=359914&view=rev
Log:
[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
Modified:
compiler-rt/trunk/lib/hwasan/hwasan_linux.cpp
Modified: compiler-rt/trunk/lib/hwasan/hwasan_linux.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/hwasan/hwasan_linux.cpp?rev=359914&r1=359913&r2=359914&view=diff
==============================================================================
--- compiler-rt/trunk/lib/hwasan/hwasan_linux.cpp (original)
+++ compiler-rt/trunk/lib/hwasan/hwasan_linux.cpp Fri May 3 11:20:16 2019
@@ -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
More information about the llvm-commits
mailing list