[compiler-rt] r330666 - [HWASan] Use dynamic shadow memory on Android only.

Alex Shlyapnikov via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 17:17:02 PDT 2018


Author: alekseyshl
Date: Mon Apr 23 17:17:02 2018
New Revision: 330666

URL: http://llvm.org/viewvc/llvm-project?rev=330666&view=rev
Log:
[HWASan] Use dynamic shadow memory on Android only.

There're issues with IFUNC support on other platforms.

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

Modified:
    compiler-rt/trunk/lib/hwasan/hwasan_mapping.h

Modified: compiler-rt/trunk/lib/hwasan/hwasan_mapping.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/hwasan/hwasan_mapping.h?rev=330666&r1=330665&r2=330666&view=diff
==============================================================================
--- compiler-rt/trunk/lib/hwasan/hwasan_mapping.h (original)
+++ compiler-rt/trunk/lib/hwasan/hwasan_mapping.h Mon Apr 23 17:17:02 2018
@@ -53,10 +53,10 @@ static constexpr __sanitizer::u64 kDefau
 constexpr __sanitizer::uptr kShadowScale = 4;
 constexpr __sanitizer::uptr kShadowAlignment = 1ULL << kShadowScale;
 
-#if defined(__x86_64__)
-# define HWASAN_FIXED_MAPPING 1
-#else
+#if SANITIZER_ANDROID
 # define HWASAN_FIXED_MAPPING 0
+#else
+# define HWASAN_FIXED_MAPPING 1
 #endif
 
 #if HWASAN_FIXED_MAPPING




More information about the llvm-commits mailing list