thread mgr: Free aux stack only when it was allocated (#3282)

When thread manager is enabled, the aux stack of exec_env may be allocated
by wasm_cluster_allocate_aux_stack or disabled by setting aux_stack_bottom
as UINTPTR_MAX directly. For the latter, no need to free it.

And fix an issue when paring `--gc-heap-size=n` argument for iwasm, and
fix a variable shadowed warning in fast-jit.
This commit is contained in:
Wenyong Huang
2024-04-08 09:06:49 +08:00
committed by GitHub
parent 4ef724bbff
commit b11dbcba0a
4 changed files with 19 additions and 7 deletions

View File

@ -117,6 +117,9 @@ typedef struct WASMExecEnv {
/* whether current thread is detached */
bool thread_is_detached;
/* whether the aux stack is allocated */
bool is_aux_stack_allocated;
#endif
#if WASM_ENABLE_GC != 0