Grab cluster->lock when modifying exec_env->module_inst (#2685)

Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2680

And when switching back to the original module_inst, propagate exception if any.

cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/2512
This commit is contained in:
YAMAMOTO Takashi
2023-11-09 19:56:02 +09:00
committed by GitHub
parent 797e534cec
commit 24c4d256b3
8 changed files with 103 additions and 36 deletions

View File

@ -215,6 +215,12 @@ wasm_cluster_set_debug_inst(WASMCluster *cluster, WASMDebugInstance *inst);
#endif /* end of WASM_ENABLE_DEBUG_INTERP != 0 */
void
wasm_cluster_traverse_lock(WASMExecEnv *exec_env);
void
wasm_cluster_traverse_unlock(WASMExecEnv *exec_env);
#ifdef __cplusplus
}
#endif