[llvm-commits] [llvm] r153189 - /llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Kostya Serebryany
kcc at google.com
Wed Mar 21 08:28:51 PDT 2012
Author: kcc
Date: Wed Mar 21 10:28:50 2012
New Revision: 153189
URL: http://llvm.org/viewvc/llvm-project?rev=153189&view=rev
Log:
[asan] fix one more bug related to long double
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=153189&r1=153188&r2=153189&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Wed Mar 21 10:28:50 2012
@@ -454,7 +454,7 @@
GlobalVariable *G = GlobalsToChange[i];
PointerType *PtrTy = cast<PointerType>(G->getType());
Type *Ty = PtrTy->getElementType();
- uint64_t SizeInBytes = TD->getTypeStoreSizeInBits(Ty) / 8;
+ uint64_t SizeInBytes = TD->getTypeAllocSize(Ty);
uint64_t RightRedzoneSize = RedzoneSize +
(RedzoneSize - (SizeInBytes % RedzoneSize));
Type *RightRedZoneTy = ArrayType::get(IRB.getInt8Ty(), RightRedzoneSize);
More information about the llvm-commits
mailing list