LibWasm: Preserve the right number of values on loop entry

This commit is contained in:
Ali Mohammad Pur
2026-01-22 15:27:10 +01:00
committed by Ali Mohammad Pur
parent a5db31943e
commit a0ce33e616
Notes: github-actions[bot] 2026-02-06 10:42:58 +00:00

View File

@@ -1704,8 +1704,8 @@ HANDLE_INSTRUCTION(loop)
{
LOG_INSN;
auto& args = instruction->arguments().get<Instruction::StructuredInstructionArgs>();
size_t arity = args.meta->arity;
configuration.label_stack().unchecked_append(Label(arity, short_ip.current_ip_value + 1, configuration.value_stack().size() - arity));
size_t params = args.meta->parameter_count;
configuration.label_stack().unchecked_append(Label(params, short_ip.current_ip_value + 1, configuration.value_stack().size() - params));
TAILCALL return continue_(HANDLER_PARAMS(DECOMPOSE_PARAMS_NAME_ONLY));
}