WebAssembly / WebAssembly/binaryen
Type-check invalid unreachable code
Open
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
(module
(memory 1)
(func (param i64) (result i64)
unreachable
br_if 0
i64.load
)
)
however, the spec interpreter and wabt doesn't, reporting:
0000000: error: type mismatch in i64.load, expected [i32] but got [i64]
I guess this is related to the way how binaryen treats unreachable code...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the module from the issue with Binaryen, the WebAssembly spec interpreter, and wabt, then compare how each validates the unreachable sequence. Trace Binaryen's unreachable-code type checking and confirm the intended result against the specification; done when its behavior and diagnostics consistently match the chosen reference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100