From a5753ea920a5a63a5b202d663c2f86cfc678f307 Mon Sep 17 00:00:00 2001 From: TianlongLiang <111852609+TianlongLiang@users.noreply.github.com> Date: Tue, 2 Jul 2024 11:03:49 +0800 Subject: [PATCH] interp debugger: Fix setting invalid value to step_count (#3583) The `exec_env->current_status->step_count` should be set same as the handling when WASM_ENABLE_LABELS_AS_VALUES is not 0. Fixes issue https://github.com/bytecodealliance/wasm-micro-runtime/issues/3475. --- core/iwasm/interpreter/wasm_interp_classic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/iwasm/interpreter/wasm_interp_classic.c b/core/iwasm/interpreter/wasm_interp_classic.c index f7193c952..b41283929 100644 --- a/core/iwasm/interpreter/wasm_interp_classic.c +++ b/core/iwasm/interpreter/wasm_interp_classic.c @@ -1424,7 +1424,7 @@ wasm_interp_call_func_import(WASMModuleInstance *module_inst, #define HANDLE_OP_END() \ os_mutex_lock(&exec_env->wait_lock); \ if (exec_env->current_status->signal_flag == WAMR_SIG_SINGSTEP \ - && exec_env->current_status->step_count++ == 2) { \ + && exec_env->current_status->step_count++ == 1) { \ exec_env->current_status->step_count = 0; \ SYNC_ALL_TO_FRAME(); \ wasm_cluster_thread_waiting_run(exec_env); \