[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 21:24:27 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL279413: [asan] Use 1 byte aligned stores to poison shadow memory (authored by vitalybuka).

Changed prior to commit:
  https://reviews.llvm.org/D23762?vs=68819&id=68821#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23762

Files:
  llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Index: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ llvm/trunk/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.68821.patch
Type: text/x-patch
Size: 689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160822/65694b07/attachment.bin>


More information about the llvm-commits mailing list