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 | 29f975f8ffda1f5d78cbf2530c2316abef11aa70 (patch) | |
tree | 223ec55f321dd94fb77e52cd046da09a5619a514 /lib/Transforms | |
parent | 0afa33115c5f0bce263ef370886f53bc845ab7c1 (diff) | |
download | external_llvm-29f975f8ffda1f5d78cbf2530c2316abef11aa70.zip external_llvm-29f975f8ffda1f5d78cbf2530c2316abef11aa70.tar.gz external_llvm-29f975f8ffda1f5d78cbf2530c2316abef11aa70.tar.bz2 |
[asan] fix 32-bit builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Instrumentation/AddressSanitizer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 477cb1a..0474eb5 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/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; |