summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-02-11 05:28:24 +0000
committerLang Hames <lhames@gmail.com>2014-02-11 05:28:24 +0000
commitd41001706a224bab7539c76ef53da258511ab043 (patch)
treed7722c76c41d314fbdfe79c9977bd442a80bc920 /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
parent3f6954ffd0b0915c7c93bf1cd386fd374bbdab50 (diff)
downloadbcm5719-llvm-d41001706a224bab7539c76ef53da258511ab043.tar.gz
bcm5719-llvm-d41001706a224bab7539c76ef53da258511ab043.zip
In RuntimeDyldImpl::emitSection, make Allocate (section size to be allocated) a
uintptr_t. An unsigned could overflow for large sections. No test case - anything big enough to overflow an unsigned is going to take an appreciable time to zero when the test passes. The choice of uintptr_t was made to match the RTDyldMemoryManager APIs, but these should probably be hardcoded to uint64_ts: It is legitimate to JIT for 64-bit targets from a 32-bit host/compiler. llvm-svn: 201127
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index b858965b5c2..7a1c4d7690e 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -298,7 +298,7 @@ unsigned RuntimeDyldImpl::emitSection(ObjectImage &Obj,
if (Name == ".eh_frame")
PaddingSize = 4;
- unsigned Allocate;
+ uintptr_t Allocate;
unsigned SectionID = Sections.size();
uint8_t *Addr;
const char *pData = 0;
OpenPOWER on IntegriCloud