WebAssembly / WebAssembly/wabt
option for wasm-validate to output context
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.1k
- Forks
- 827
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 18
Description
Currently wasm-validate outputs the offending operation, however the context needs to be grep'ed manually:
wasm-validate main.wasm
main.wasm:000007b: error: type mismatch in i32.and, expected [i32, i32] but got [... i64, i32]
wasm-objdump main.wasm -d | grep -B3 7b
000077: 20 03 | local.get 3 <width>
000079: 53 | i64.lt_s
00007a: 71 | i32.and
00007b: 04 40 | if
It would be nice to have a flag for wasm-validate to directly output the context, maybe even smart enough to trace back all relevant preceding ops.
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
Start by reproducing the shown validation error with wasm-validate and compare its address with wasm-objdump -d output. Read the wasm-validate command path and establish the intended context or tracing scope with maintainers. Done means the selected flag produces useful surrounding operations for the example, with tests covering the chosen output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100