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:
@ -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})
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user