From 0672a27bb5d30f7349cd6370baac91c47e0a045f Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 22 Aug 2016 04:16:14 +0000 Subject: [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 --- llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp') 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; } -- cgit v1.2.3