This is a port of the LLVM-svn commit number 359914, it allows
compilation of the library without using interceptors.

This has been useful for testing.

libsanitizer/ChangeLog:

2019-09-06  Matthew Malcomson  <matthew.malcom...@arm.com>

        * hwasan/hwasan_linux.cc: Allow compilation without
        interceptors.



###############     Attachment also inlined for ease of reply    ###############


diff --git a/libsanitizer/hwasan/hwasan_linux.cc 
b/libsanitizer/hwasan/hwasan_linux.cc
index 
eef332fe9f16f36416bc93fc3e90eacf27f687f8..cdb02f161f691dcfe0f6f267a3a478d81cca458b
 100644
--- a/libsanitizer/hwasan/hwasan_linux.cc
+++ b/libsanitizer/hwasan/hwasan_linux.cc
@@ -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
 THREADLOCAL uptr __hwasan_tls;
 #endif
 

diff --git a/libsanitizer/hwasan/hwasan_linux.cc 
b/libsanitizer/hwasan/hwasan_linux.cc
index 
eef332fe9f16f36416bc93fc3e90eacf27f687f8..cdb02f161f691dcfe0f6f267a3a478d81cca458b
 100644
--- a/libsanitizer/hwasan/hwasan_linux.cc
+++ b/libsanitizer/hwasan/hwasan_linux.cc
@@ -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
 THREADLOCAL uptr __hwasan_tls;
 #endif
 

Reply via email to