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

@ -3,7 +3,7 @@
set (LIB_WASI_THREADS_DIR ${CMAKE_CURRENT_LIST_DIR})
add_definitions (-DWASM_ENABLE_LIB_WASI_THREADS=1)
add_definitions (-DWASM_ENABLE_LIB_WASI_THREADS=1 -DWASM_ENABLE_HEAP_AUX_STACK_ALLOCATION=1)
include_directories(${LIB_WASI_THREADS_DIR})

View File

@ -4,7 +4,6 @@
*/
#include "bh_log.h"
#include "wasmtime_ssp.h"
#include "thread_manager.h"
#if WASM_ENABLE_INTERP != 0
@ -58,9 +57,6 @@ thread_start(void *arg)
wasm_cluster_spread_exception(exec_env);
}
/* routine exit, destroy instance */
wasm_runtime_deinstantiate_internal(module_inst, true);
wasm_runtime_free(thread_arg);
exec_env->thread_arg = NULL;