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:
@ -9293,8 +9293,8 @@ jit_codegen_init()
|
||||
imm.setValue(INT32_MAX);
|
||||
a.jne(imm);
|
||||
|
||||
char *stream = (char *)a.code()->sectionById(0)->buffer().data()
|
||||
+ a.code()->sectionById(0)->buffer().size();
|
||||
char *stream_old = (char *)a.code()->sectionById(0)->buffer().data()
|
||||
+ a.code()->sectionById(0)->buffer().size();
|
||||
|
||||
/* If yes, call jit_set_exception_with_id to throw exception,
|
||||
and then set eax to JIT_INTERP_ACTION_THROWN, and jump to
|
||||
@ -9319,7 +9319,7 @@ jit_codegen_init()
|
||||
/* Patch the offset of jne instruction */
|
||||
char *stream_new = (char *)a.code()->sectionById(0)->buffer().data()
|
||||
+ a.code()->sectionById(0)->buffer().size();
|
||||
*(int32 *)(stream - 4) = (int32)(stream_new - stream);
|
||||
*(int32 *)(stream_old - 4) = (int32)(stream_new - stream_old);
|
||||
}
|
||||
|
||||
/* Load compiled func ptr and call it */
|
||||
|
||||
Reference in New Issue
Block a user