[llvm] r279413 - [asan] Use 1 byte aligned stores to poison shadow memory
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 21 21:16:14 PDT 2016
Author: vitalybuka
Date: Sun Aug 21 23:16:14 2016
New Revision: 279413
URL: http://llvm.org/viewvc/llvm-project?rev=279413&view=rev
Log:
[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
Modified:
llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=279413&r1=279412&r2=279413&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Sun Aug 21 23:16:14 2016
@@ -2011,8 +2011,8 @@ void FunctionStackPoisoner::poisonStackF
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;
}
More information about the llvm-commits
mailing list