[PATCH] D23762: [asan] Use 1 byte aligned stores to poison shadow memory
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 21 20:47:19 PDT 2016
vitalybuka created this revision.
vitalybuka added a reviewer: eugenis.
vitalybuka added a subscriber: llvm-commits.
Herald added a subscriber: aemerson.
r279379 introduced crash on arm 32bit bot. I suspect this is alignment issue.
https://reviews.llvm.org/D23762
Files:
lib/Transforms/Instrumentation/AddressSanitizer.cpp
Index: lib/Transforms/Instrumentation/AddressSanitizer.cpp
===================================================================
--- lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -2011,8 +2011,8 @@
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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23762.68819.patch
Type: text/x-patch
Size: 656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160822/9166eb48/attachment.bin>
More information about the llvm-commits
mailing list