From 4b42cfdbce1b724137eea3f76868f42b36b4d51c Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 4 Nov 2025 19:10:02 -0500 Subject: [PATCH] fix: remove stack size check from exec_env_check (#4688) As per [this blogpost](https://bytecodealliance.github.io/wamr.dev/blog/understand-the-wamr-stacks/) WAMR does not require a WASM stack in AoT/JIT mode, but `wasm_runtime_exec_env_check` still always expects the size to be > 0 --- core/iwasm/common/wasm_runtime_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/iwasm/common/wasm_runtime_common.c b/core/iwasm/common/wasm_runtime_common.c index 5c832a64e..e6bde7363 100644 --- a/core/iwasm/common/wasm_runtime_common.c +++ b/core/iwasm/common/wasm_runtime_common.c @@ -582,7 +582,7 @@ fail1: static bool wasm_runtime_exec_env_check(WASMExecEnv *exec_env) { - return exec_env && exec_env->module_inst && exec_env->wasm_stack_size > 0 + return exec_env && exec_env->module_inst && exec_env->wasm_stack.top_boundary == exec_env->wasm_stack.bottom + exec_env->wasm_stack_size && exec_env->wasm_stack.top <= exec_env->wasm_stack.top_boundary;