Skip to content

Commit 5c89022

Browse files
committed
wasm_set_exception: fix a crash in "clear" case
1 parent 292fb32 commit 5c89022

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/iwasm/common/wasm_runtime_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2389,7 +2389,7 @@ wasm_set_exception(WASMModuleInstance *module_inst, const char *exception)
23892389

23902390
#if WASM_ENABLE_THREAD_MGR != 0
23912391
/* Only spread non "wasi proc exit" exception */
2392-
if (!strstr(exception, "wasi proc exit")) {
2392+
if (exception == NULL || !strstr(exception, "wasi proc exit")) {
23932393
WASMExecEnv *exec_env = wasm_clusters_search_exec_env(
23942394
(WASMModuleInstanceCommon *)module_inst);
23952395
if (exec_env) {

0 commit comments

Comments
 (0)