[llvm] [JIT] Fix crash in unit tests (PR #113492)
Kai Nacke via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 23 13:15:11 PDT 2024
https://github.com/redstar created https://github.com/llvm/llvm-project/pull/113492
The unit tests `ReOptimizeLayerTest.BasicReOptimization` and `JITLinkRedirectionManagerTest.BasicRedirectionOperation` are failing for me with the error:
```
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior to being destroyed).
```
The error is raised when a value is assigned to `Err`, due to the the missing `ErrorAsOutParameter`.
>From 09444174a7640c6b1ae68639423fb75de0e7d3b5 Mon Sep 17 00:00:00 2001
From: Kai Nacke <kai.peter.nacke at ibm.com>
Date: Wed, 23 Oct 2024 16:13:39 -0400
Subject: [PATCH] [JIT] Fix crash in unit tests
The unit tests `ReOptimizeLayerTest.BasicReOptimization` and `JITLinkRedirectionManagerTest.BasicRedirectionOperation` are failing for me with the error:
```
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior to being destroyed).
```
The error is raised when a value is assigned to `Err`, due to the the missing `ErrorAsOutParameter`.
---
.../llvm/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.h b/llvm/include/llvm/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.h
index 52f284c89bdade..5b73635d3b1cac 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.h
@@ -59,6 +59,7 @@ class JITLinkRedirectableSymbolManager : public RedirectableSymbolManager,
ObjLinkingLayer.getExecutionSession().getTargetTriple())),
PtrJumpStubCreator(jitlink::getPointerJumpStubCreator(
ObjLinkingLayer.getExecutionSession().getTargetTriple())) {
+ ErrorAsOutParameter _(&Err);
if (!AnonymousPtrCreator || !PtrJumpStubCreator)
Err = make_error<StringError>("Architecture not supported",
inconvertibleErrorCode());
More information about the llvm-commits
mailing list