[ORC][examples] Fix segfault in LLJITWithTargetProcessControl
authorStefan Gränitz <stefan.graenitz@gmail.com>
Thu, 23 Sep 2021 14:30:05 +0000 (16:30 +0200)
committerStefan Gränitz <stefan.graenitz@gmail.com>
Thu, 23 Sep 2021 14:33:00 +0000 (16:33 +0200)
Issue reported during review D110260

llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/LLJITWithTargetProcessControl.cpp

index ac5ea56..45f4f48 100644 (file)
@@ -147,7 +147,8 @@ int main(int argc, char *argv[]) {
       });
 
   // (3) Create stubs and call-through managers:
-  auto EPCIU = ExitOnErr(EPCIndirectionUtils::Create(*EPC));
+  auto EPCIU = ExitOnErr(EPCIndirectionUtils::Create(
+      J->getExecutionSession().getExecutorProcessControl()));
   ExitOnErr(EPCIU->writeResolverBlock(pointerToJITTargetAddress(&reenter),
                                       pointerToJITTargetAddress(EPCIU.get())));
   EPCIU->createLazyCallThroughManager(