mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-06-01 22:47:14 +00:00
loader: Remove updating ctx->dynamic_offset in emit_br_info (#3259)
Should not update `ctx->dynamic_offset` in emit_br_info, since the `Part e` only sets the dst offsets, the operand stack should not be changed, e.g., the stack operands are to be used by the opcodes followed by `br_if` opcode. Reported in https://github.com/bytecodealliance/wasm-micro-runtime/issues/3210.
This commit is contained in:
parent
89f4982123
commit
f933d4c829
|
@ -8907,7 +8907,6 @@ wasm_loader_emit_br_info(WASMLoaderContext *ctx, BranchBlock *frame_csp,
|
|||
/* Part e */
|
||||
dynamic_offset =
|
||||
frame_csp->dynamic_offset + wasm_get_cell_num(types, arity);
|
||||
ctx->dynamic_offset = dynamic_offset;
|
||||
for (i = (int32)arity - 1; i >= 0; i--) {
|
||||
cell = (uint8)wasm_value_type_cell_num(types[i]);
|
||||
dynamic_offset -= cell;
|
||||
|
|
|
@ -4698,7 +4698,6 @@ wasm_loader_emit_br_info(WASMLoaderContext *ctx, BranchBlock *frame_csp,
|
|||
/* Part e */
|
||||
dynamic_offset =
|
||||
frame_csp->dynamic_offset + wasm_get_cell_num(types, arity);
|
||||
ctx->dynamic_offset = dynamic_offset;
|
||||
for (i = (int32)arity - 1; i >= 0; i--) {
|
||||
cell = (uint8)wasm_value_type_cell_num(types[i]);
|
||||
dynamic_offset -= cell;
|
||||
|
|
Loading…
Reference in New Issue
Block a user