mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-18 19:31:22 +00:00
Fix LLVM object loader exceptions.
This commit is contained in:
lib/llvm-backend
@ -27,7 +27,7 @@ struct UnwindPoint {
|
||||
UnwindPoint *prev;
|
||||
jmp_buf stack;
|
||||
std::function<void()> *f;
|
||||
std::unique_ptr<std::exception> exception;
|
||||
std::unique_ptr<WasmException> exception;
|
||||
};
|
||||
|
||||
static thread_local UnwindPoint *unwind_state = nullptr;
|
||||
@ -47,11 +47,11 @@ void catch_unwind(std::function<void()> &&f) {
|
||||
|
||||
unwind_state = current.prev;
|
||||
if (current.exception) {
|
||||
throw *current.exception;
|
||||
throw std::move(current.exception);
|
||||
}
|
||||
}
|
||||
|
||||
void unsafe_unwind(std::exception *exception) {
|
||||
void unsafe_unwind(WasmException *exception) {
|
||||
UnwindPoint *state = unwind_state;
|
||||
if (state) {
|
||||
state->exception.reset(exception);
|
||||
|
Reference in New Issue
Block a user