Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix label index out-of-range references in op_br_table_cache #2615

Merged
merged 2 commits into from
Oct 3, 2023
Merged

Fix label index out-of-range references in op_br_table_cache #2615

merged 2 commits into from
Oct 3, 2023

Conversation

funera1
Copy link
Contributor

@funera1 funera1 commented Oct 2, 2023

Fixed a bug in the processing of the br_table_cache opcode that caused out-of-range references when the label index was greater than the length of the label.

The WebAssembly Specification dictates that when executing the br_table instruction, if the label index exceeds the length of the label, it should be assigned the length of the label.
https://webassembly.github.io/spec/core/exec/instructions.html#xref-syntax-instructions-syntax-instr-control-mathsf-br-table-l-ast-l-n

@wenyongh wenyongh merged commit 64baf54 into bytecodealliance:main Oct 3, 2023
368 checks passed
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
…ealliance#2615)

Fixed a bug in the processing of the br_table_cache opcode that caused out-of-range
references when the label index was greater than the length of the label.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants