summaryrefslogtreecommitdiff
path: root/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
commita70e3fca1a0e1df2fccacaed3ea0fb91510363ff (patch)
tree5c26cf851d7498562146db625b96b982adee9bb0 /lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
parent35c474d251ac8d67e7239d3d863bf4c1c7bef6d7 (diff)
downloadllvm-a70e3fca1a0e1df2fccacaed3ea0fb91510363ff.tar.gz
llvm-a70e3fca1a0e1df2fccacaed3ea0fb91510363ff.tar.bz2
llvm-a70e3fca1a0e1df2fccacaed3ea0fb91510363ff.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index b858965b5c..7a1c4d7690 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/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;