Skip to content

Commit e03a7d6

Browse files
committed
fix bug
1 parent 658f168 commit e03a7d6

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

core/iwasm/interpreter/wasm_loader.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9869,13 +9869,12 @@ wasm_loader_pop_frame_offset(WASMLoaderContext *ctx, uint8 type,
98699869
stack will not go underflow. But we don't thrown error
98709870
and return true here, because the error msg should be
98719871
given in wasm_loader_pop_frame_ref */
9872-
if (!check_offset_pop(ctx, cell_num_to_pop)
9873-
|| !check_dynamic_offset_pop(ctx, cell_num_to_pop)) {
9872+
if (!check_offset_pop(ctx, cell_num_to_pop))
98749873
return true;
9875-
}
98769874

98779875
ctx->frame_offset -= cell_num_to_pop;
9878-
if ((*(ctx->frame_offset) > ctx->start_dynamic_offset)
9876+
if (check_dynamic_offset_pop(ctx, cell_num_to_pop)
9877+
&& (*(ctx->frame_offset) > ctx->start_dynamic_offset)
98799878
&& (*(ctx->frame_offset) < ctx->max_dynamic_offset))
98809879
ctx->dynamic_offset -= cell_num_to_pop;
98819880

0 commit comments

Comments
 (0)