summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2016-08-22 04:16:14 +0000
committerVitaly Buka <vitalybuka@google.com>2016-08-22 04:16:14 +0000
commit0672a27bb5d30f7349cd6370baac91c47e0a045f (patch)
treecea4ac834ea45e67481198887e229c0fb8b09358
parentca0eda3e6a4d4a514fda93c1380407c3632d1fbf (diff)
downloadbcm5719-llvm-0672a27bb5d30f7349cd6370baac91c47e0a045f.tar.gz
bcm5719-llvm-0672a27bb5d30f7349cd6370baac91c47e0a045f.zip
[asan] Use 1 byte aligned stores to poison shadow memory
Summary: r279379 introduced crash on arm 32bit bot. I suspect this is alignment issue. Reviewers: eugenis Subscribers: llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D23762 llvm-svn: 279413
-rw-r--r--llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 7bf958eb82c..53dd96e205c 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -2011,8 +2011,8 @@ void FunctionStackPoisoner::poisonStackFrameInline(
Value *Ptr = IRB.CreateAdd(ShadowBase, ConstantInt::get(IntptrTy, i));
Value *Poison = IRB.getIntN(StoreSizeInBytes * 8, Val);
- IRB.CreateStore(Poison,
- IRB.CreateIntToPtr(Ptr, Poison->getType()->getPointerTo()));
+ IRB.CreateAlignedStore(
+ Poison, IRB.CreateIntToPtr(Ptr, Poison->getType()->getPointerTo()), 1);
i += StoreSizeInBytes;
}
OpenPOWER on IntegriCloud