[asan] fix one more bug related to long double

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153189 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany 2012-03-21 15:28:50 +00:00
parent d9e85ef08b
commit 208a4ff2b5

View File

@ -454,7 +454,7 @@ bool AddressSanitizer::insertGlobalRedzones(Module &M) {
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);