Skip to content

Commit 38f769a

Browse files
committed
set_exception_visitor: remove the special case for wasi proc exit
while wasi proc exit is not a real trap, what the runtime does on it is mostly same as real traps. that is, kill the siblings threads and represent the exit/trap as the result of the "process" to the user api. there seems no reason to distinuguish it from real traps here. note that: * the target thread either doesn't care the specific exception type or ignore wasi proc exit by themselves. (clear_wasi_proc_exit_exception) * clear_wasi_proc_exit_exception only clears local exception.
1 parent b87cc94 commit 38f769a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

core/iwasm/libraries/thread-mgr/thread_manager.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,12 +1264,8 @@ set_exception_visitor(void *node, void *user_data)
12641264

12651265
exception_lock(wasm_inst);
12661266
if (data->exception != NULL) {
1267-
/* Only spread non "wasi proc exit" exception */
1268-
if (strcmp(data->exception, "wasi proc exit")) {
1269-
snprintf(wasm_inst->cur_exception,
1270-
sizeof(wasm_inst->cur_exception), "Exception: %s",
1271-
data->exception);
1272-
}
1267+
snprintf(wasm_inst->cur_exception, sizeof(wasm_inst->cur_exception),
1268+
"Exception: %s", data->exception);
12731269
}
12741270
else {
12751271
wasm_inst->cur_exception[0] = '\0';

0 commit comments

Comments
 (0)