[PATCH] D11645: [sanitizers] Enable dfsan for aarch64
Adhemerval Zanella
adhemerval.zanella at linaro.org
Thu Jul 30 07:43:30 PDT 2015
zatrazz created this revision.
zatrazz added reviewers: t.p.northover, aemerson, rengolin.
zatrazz added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.
This patch enable DFSan memory transformation for aarch64 (39-bit VMA).
http://reviews.llvm.org/D11645
Files:
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
Index: lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
===================================================================
--- lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
+++ lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
@@ -420,6 +420,8 @@
bool IsX86_64 = TargetTriple.getArch() == llvm::Triple::x86_64;
bool IsMIPS64 = TargetTriple.getArch() == llvm::Triple::mips64 ||
TargetTriple.getArch() == llvm::Triple::mips64el;
+ bool IsAArch64 = TargetTriple.getArch() == llvm::Triple::aarch64 ||
+ TargetTriple.getArch() == llvm::Triple::aarch64_be;
const DataLayout &DL = M.getDataLayout();
@@ -434,6 +436,8 @@
ShadowPtrMask = ConstantInt::getSigned(IntptrTy, ~0x700000000000LL);
else if (IsMIPS64)
ShadowPtrMask = ConstantInt::getSigned(IntptrTy, ~0xF000000000LL);
+ else if (IsAArch64)
+ ShadowPtrMask = ConstantInt::getSigned(IntptrTy, ~0x7800000000LL);
else
report_fatal_error("unsupported triple");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11645.31024.patch
Type: text/x-patch
Size: 999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150730/857f7218/attachment.bin>
More information about the llvm-commits
mailing list