File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
llvm/include/llvm/ExecutionEngine/Orc Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class OrcRPCTPCJITLinkMemoryManager : public jitlink::JITLinkMemoryManager {
5959 auto I = HostAllocs.find (Seg);
6060 assert (I != HostAllocs.end () && " No host allocation for segment" );
6161 auto &HA = I->second ;
62- return {HA.Mem .get (), HA.Size };
62+ return {HA.Mem .get (), static_cast < size_t >( HA.Size ) };
6363 }
6464
6565 JITTargetAddress getTargetMemory (ProtectionFlags Seg) override {
@@ -153,6 +153,9 @@ class OrcRPCTPCJITLinkMemoryManager : public jitlink::JITLinkMemoryManager {
153153 HostAllocMap HostAllocs;
154154
155155 for (auto &KV : Request) {
156+ assert (KV.second .getContentSize () <= std::numeric_limits<size_t >::max () &&
157+ " Content size is out-of-range for host" );
158+
156159 RMR.push_back ({orcrpctpc::toWireProtectionFlags (
157160 static_cast <sys::Memory::ProtectionFlags>(KV.first )),
158161 KV.second .getContentSize () + KV.second .getZeroFillSize (),
You can’t perform that action at this time.
0 commit comments