[llvm] cbf1535 - [ORC] Fix fall-through in error case in EPCGenericDylibManager::lookupAsync.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 06:24:55 PDT 2024


Author: Lang Hames
Date: 2024-05-09T23:24:45+10:00
New Revision: cbf1535cc813b2f226498d974c43675832abc233

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

LOG: [ORC] Fix fall-through in error case in EPCGenericDylibManager::lookupAsync.

In the event of a serialization error (e.g. due to a network dropout) we should
only run the Complete handler once, passing the serialization error value.

No test-case: This would require a deliberately injected failure in a
remote-JIT test and we don't have the infrastructure for that at the moment.

rdar://126772381

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/EPCGenericDylibManager.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/EPCGenericDylibManager.cpp b/llvm/lib/ExecutionEngine/Orc/EPCGenericDylibManager.cpp
index 6a7cab4a55100..7c0d890129229 100644
--- a/llvm/lib/ExecutionEngine/Orc/EPCGenericDylibManager.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/EPCGenericDylibManager.cpp
@@ -109,6 +109,7 @@ void EPCGenericDylibManager::lookupAsync(tpctypes::DylibHandle H,
         if (SerializationErr) {
           cantFail(Result.takeError());
           Complete(std::move(SerializationErr));
+          return;
         }
         Complete(std::move(Result));
       },


        


More information about the llvm-commits mailing list