From 208a4ff2b56f453910bb817540f34b8169f7702a Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Wed, 21 Mar 2012 15:28:50 +0000 Subject: [PATCH] [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 --- lib/Transforms/Instrumentation/AddressSanitizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index a51bd7e41c8..b43b9e5face 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -454,7 +454,7 @@ bool AddressSanitizer::insertGlobalRedzones(Module &M) { GlobalVariable *G = GlobalsToChange[i]; PointerType *PtrTy = cast(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); -- 2.34.1