[PATCH] D12159: [sanitizers] Add ASAN support for AArch64 42-bit VMA
Adhemerval Zanella via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 10:14:50 PDT 2015
zatrazz created this revision.
zatrazz added reviewers: rengolin, t.p.northover, pcc, aemerson.
zatrazz added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.
This patch adds support for asan on aarch64-linux with 42-bit VMA
(current default config for 64K pagesize kernels). The support is
enabled by defining the SANITIZER_AARCH64_VMA to 42 at build time
for both clang/llvm and compiler-rt. The default VMA is 39 bits.
The patch is sent along with a compiler-rt one to enable the same
functionality for aarch64. The same compiler flag is used.
http://reviews.llvm.org/D12159
Files:
lib/Transforms/Instrumentation/AddressSanitizer.cpp
Index: lib/Transforms/Instrumentation/AddressSanitizer.cpp
===================================================================
--- lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -72,7 +72,11 @@
static const uint64_t kPPC64_ShadowOffset64 = 1ULL << 41;
static const uint64_t kMIPS32_ShadowOffset32 = 0x0aaa0000;
static const uint64_t kMIPS64_ShadowOffset64 = 1ULL << 37;
+#if SANITIZER_AARCH64_VMA == 39
static const uint64_t kAArch64_ShadowOffset64 = 1ULL << 36;
+#elif SANITIZER_AARCH64_VMA == 42
+static const uint64_t kAArch64_ShadowOffset64 = 1ULL << 39;
+#endif
static const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30;
static const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46;
static const uint64_t kWindowsShadowOffset32 = 3ULL << 28;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12159.32568.patch
Type: text/x-patch
Size: 817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150819/ec2ef9d6/attachment.bin>
More information about the llvm-commits
mailing list