diff options
author | Kostya Serebryany <kcc@google.com> | 2013-01-24 10:43:50 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2013-01-24 10:43:50 +0000 |
commit | e35d59a8d0c68e6e7c1cf1be1908915efb6cc65c (patch) | |
tree | bb1ad6a605e47ee32eec049f5c73cd118638483a /llvm/lib/Transforms | |
parent | 76aacbd8749f51c9fedae4a76b0ae4ec2c789f38 (diff) | |
download | bcm5719-llvm-e35d59a8d0c68e6e7c1cf1be1908915efb6cc65c.tar.gz bcm5719-llvm-e35d59a8d0c68e6e7c1cf1be1908915efb6cc65c.zip |
[asan] fix 32-bit builds
llvm-svn: 173338
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 477cb1a6533..0474eb516aa 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -875,15 +875,15 @@ bool AddressSanitizerModule::runOnModule(Module &M) { Value *FirstDynamic = 0, *LastDynamic = 0; for (size_t i = 0; i < n; i++) { - static const size_t kMaxGlobalRedzone = 1 << 18; + static const uint64_t kMaxGlobalRedzone = 1 << 18; GlobalVariable *G = GlobalsToChange[i]; PointerType *PtrTy = cast<PointerType>(G->getType()); Type *Ty = PtrTy->getElementType(); uint64_t SizeInBytes = TD->getTypeAllocSize(Ty); - size_t MinRZ = RedzoneSize(); + uint64_t MinRZ = RedzoneSize(); // MinRZ <= RZ <= kMaxGlobalRedzone // and trying to make RZ to be ~ 1/4 of SizeInBytes. - size_t RZ = std::max(MinRZ, + uint64_t RZ = std::max(MinRZ, std::min(kMaxGlobalRedzone, (SizeInBytes / MinRZ / 4) * MinRZ)); uint64_t RightRedzoneSize = RZ; |