Enable aux stack allocations on application heap (#1799)

This is necessary for WASI threads as the aux stack should be managed by the application.
See https://github.com/bytecodealliance/wasm-micro-runtime/issues/1790 for details.
This commit is contained in:
Marcin Kolny
2022-12-19 02:58:12 +00:00
committed by GitHub
parent 8fc641377a
commit 0f637cff07
7 changed files with 72 additions and 26 deletions

View File

@ -504,7 +504,6 @@ pthread_start_routine(void *arg)
info_node->exec_env = exec_env;
info_node->u.thread = exec_env->handle;
if (!append_thread_info_node(info_node)) {
wasm_runtime_deinstantiate_internal(module_inst, true);
delete_thread_info_node(info_node);
os_cond_signal(&parent_exec_env->wait_cond);
os_mutex_unlock(&parent_exec_env->wait_lock);
@ -527,9 +526,6 @@ pthread_start_routine(void *arg)
/* destroy pthread key values */
call_key_destructor(exec_env);
/* routine exit, destroy instance */
wasm_runtime_deinstantiate_internal(module_inst, true);
wasm_runtime_free(routine_args);
/* if the thread is joinable, store the result in its info node,