[llvm] r175442 - [asan] revert r175266 as it breaks code with packed structures. supporting long double will require a more general solution

Kostya Serebryany kcc at google.com
Mon Feb 18 05:47:02 PST 2013


Author: kcc
Date: Mon Feb 18 07:47:02 2013
New Revision: 175442

URL: http://llvm.org/viewvc/llvm-project?rev=175442&view=rev
Log:
[asan] revert r175266 as it breaks code with packed structures. supporting long double will require a more general solution

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
    llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll

Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=175442&r1=175441&r2=175442&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Mon Feb 18 07:47:02 2013
@@ -639,7 +639,7 @@ void AddressSanitizer::instrumentMop(Ins
   Type *OrigTy = cast<PointerType>(OrigPtrTy)->getElementType();
 
   assert(OrigTy->isSized());
-  uint32_t TypeSize = TD->getTypeAllocSizeInBits(OrigTy);
+  uint32_t TypeSize = TD->getTypeStoreSizeInBits(OrigTy);
 
   if (TypeSize != 8  && TypeSize != 16 &&
       TypeSize != 32 && TypeSize != 64 && TypeSize != 128) {

Modified: llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll?rev=175442&r1=175441&r2=175442&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll (original)
+++ llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll Mon Feb 18 07:47:02 2013
@@ -96,5 +96,5 @@ entry:
 }
 
 ; CHECK: LongDoubleTest
-; CHECK: __asan_report_store16
+; CHECK-NOT: __asan_report_store16
 ; CHECK: ret void





More information about the llvm-commits mailing list