aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-02-18 13:47:02 +0000
committerKostya Serebryany <kcc@google.com>2013-02-18 13:47:02 +0000
commit605ff6655b31033dde21e61416751847bd0ee201 (patch)
tree303ba1123fa708f67f60b57ac7842aed90ec7594
parent3f213e7b3a6829a154d4e8ceb7d8689b389bd5dc (diff)
downloadexternal_llvm-605ff6655b31033dde21e61416751847bd0ee201.zip
external_llvm-605ff6655b31033dde21e61416751847bd0ee201.tar.gz
external_llvm-605ff6655b31033dde21e61416751847bd0ee201.tar.bz2
[asan] revert r175266 as it breaks code with packed structures. supporting long double will require a more general solution
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175442 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Instrumentation/AddressSanitizer.cpp2
-rw-r--r--test/Instrumentation/AddressSanitizer/basic.ll2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 5769e94..b97e342 100644
--- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -639,7 +639,7 @@ void AddressSanitizer::instrumentMop(Instruction *I) {
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) {
diff --git a/test/Instrumentation/AddressSanitizer/basic.ll b/test/Instrumentation/AddressSanitizer/basic.ll
index 746caf7..c1b27a5 100644
--- a/test/Instrumentation/AddressSanitizer/basic.ll
+++ b/test/Instrumentation/AddressSanitizer/basic.ll
@@ -96,5 +96,5 @@ entry:
}
; CHECK: LongDoubleTest
-; CHECK: __asan_report_store16
+; CHECK-NOT: __asan_report_store16
; CHECK: ret void