summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2018-04-24 00:17:02 +0000
committerAlex Shlyapnikov <alekseys@google.com>2018-04-24 00:17:02 +0000
commitcf30f6425a667dc1656588a8248c9a9d13366990 (patch)
tree070c56dc6e64131bc3029c17005f218f70d9e9e1 /compiler-rt
parent909fb12f0ceb2822f0a27d31049b3cc7ec874adb (diff)
downloadbcm5719-llvm-cf30f6425a667dc1656588a8248c9a9d13366990.tar.gz
bcm5719-llvm-cf30f6425a667dc1656588a8248c9a9d13366990.zip
[HWASan] Use dynamic shadow memory on Android only.
There're issues with IFUNC support on other platforms. Differential Revision: https://reviews.llvm.org/D45847 llvm-svn: 330666
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/hwasan/hwasan_mapping.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/hwasan/hwasan_mapping.h b/compiler-rt/lib/hwasan/hwasan_mapping.h
index 4650532e71e..650a5aefcb2 100644
--- a/compiler-rt/lib/hwasan/hwasan_mapping.h
+++ b/compiler-rt/lib/hwasan/hwasan_mapping.h
@@ -53,10 +53,10 @@ static constexpr __sanitizer::u64 kDefaultShadowSentinel = ~(__sanitizer::u64)0;
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
OpenPOWER on IntegriCloud