[llvm] 8284227 - [ORC][examples] Fix segfault in LLJITWithTargetProcessControl

Stefan Gränitz via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 07:34:15 PDT 2021


Author: Stefan Gränitz
Date: 2021-09-23T16:33:00+02:00
New Revision: 828422747d65ab6f0e3cdd75ed9a35f0afedf589

URL: https://github.com/llvm/llvm-project/commit/828422747d65ab6f0e3cdd75ed9a35f0afedf589
DIFF: https://github.com/llvm/llvm-project/commit/828422747d65ab6f0e3cdd75ed9a35f0afedf589.diff

LOG: [ORC][examples] Fix segfault in LLJITWithTargetProcessControl

Issue reported during review D110260

Added: 
    

Modified: 
    llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/LLJITWithTargetProcessControl.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/LLJITWithTargetProcessControl.cpp b/llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/LLJITWithTargetProcessControl.cpp
index ac5ea5643b03b..45f4f481e656d 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/LLJITWithTargetProcessControl.cpp
+++ b/llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/LLJITWithTargetProcessControl.cpp
@@ -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(


        


More information about the llvm-commits mailing list