Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix loader push_pop_frame_ref_offset #2590

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

wenyongh
Copy link
Contributor

wasm_loader_push_pop_frame_offset may pop n operands by using
loader_ctx->stack_cell_num to check whether the operand can be
popped or not. While loader_ctx->stack_cell_num is updated in the
later wasm_loader_push_pop_frame_ref, the check may fail if the stack
is in polymorphic state and lead to ctx->frame_offset underflow.

Fix issue #2577 and #2586.

@wenyongh wenyongh merged commit 6382162 into bytecodealliance:main Sep 26, 2023
368 checks passed
@wenyongh wenyongh deleted the fix_fast_interp branch October 5, 2023 10:54
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
`wasm_loader_push_pop_frame_offset` may pop n operands by using
`loader_ctx->stack_cell_num` to check whether the operand can be
popped or not. While `loader_ctx->stack_cell_num` is updated in the
later `wasm_loader_push_pop_frame_ref`, the check may fail if the stack
is in polymorphic state and lead to `ctx->frame_offset` underflow.

Fix issue bytecodealliance#2577 and bytecodealliance#2586.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant