From: Vitaly Buka Date: Mon, 22 Aug 2016 04:16:14 +0000 (+0000) Subject: [asan] Use 1 byte aligned stores to poison shadow memory X-Git-Tag: llvmorg-4.0.0-rc1~11785 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0672a27bb5d30f7349cd6370baac91c47e0a045f;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 7bf958e..53dd96e 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; }