Fix several issues found (#1996)
- CMakeLists.txt: add lib_export.h to install list
- Fast JIT: enlarge spill cache size to enable several standalone cases
when hw bound check is disabled
- Thread manager: wasm_cluster_exit_thread may destroy an invalid
exec_env->module_inst when exec_env was destroyed before
- samples/socket-api: fix failure to run timeout_client.wasm
- enhance CI build wasi-libc and sample/wasm-c-api-imports CMakeLlist.txt
This commit is contained in:
@ -896,6 +896,7 @@ void
|
||||
wasm_cluster_exit_thread(WASMExecEnv *exec_env, void *retval)
|
||||
{
|
||||
WASMCluster *cluster;
|
||||
WASMModuleInstanceCommon *module_inst;
|
||||
|
||||
#ifdef OS_ENABLE_HW_BOUND_CHECK
|
||||
if (exec_env->jmpbuf_stack_top) {
|
||||
@ -926,6 +927,8 @@ wasm_cluster_exit_thread(WASMExecEnv *exec_env, void *retval)
|
||||
|
||||
os_mutex_lock(&cluster->lock);
|
||||
|
||||
module_inst = exec_env->module_inst;
|
||||
|
||||
/* Free aux stack space */
|
||||
free_aux_stack(exec_env, exec_env->aux_stack_bottom.bottom);
|
||||
/* Remove exec_env */
|
||||
@ -933,7 +936,7 @@ wasm_cluster_exit_thread(WASMExecEnv *exec_env, void *retval)
|
||||
/* Destroy exec_env */
|
||||
wasm_exec_env_destroy_internal(exec_env);
|
||||
/* Routine exit, destroy instance */
|
||||
wasm_runtime_deinstantiate_internal(exec_env->module_inst, true);
|
||||
wasm_runtime_deinstantiate_internal(module_inst, true);
|
||||
|
||||
os_mutex_unlock(&cluster->lock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user