WebAssembly / WebAssembly/binaryen
wasm-opt [parse exception: popping from empty stack (at 0:543)]
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
Running some configure scripts crashes many times due to clang implicitly running wasm-opt for me. I'm using wasi-sdk 33.0 fwiw. I suspect the mismatch in declared prototype & actual function definition is upsetting the tool.
attaching one example program
$ wasm-opt --version
wasm-opt version 130 (version_130)
$ wasm-opt conftest -O2 -o x
[parse exception: popping from empty stack (at 0:456)]
Fatal: error parsing wasm (try --debug for more info)
$ wasm-opt conftest -O2 -o x --debug
reading...
reading binary from conftest
Loading 'conftest'...
[parse exception: popping from empty stack (at 0:456)]
getNumCores: 4
Assertion failed: *currp (/src/src/wasm-traversal.h: pushTask: 286)
Aborted (core dumped)
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 running wasm-opt --debug on the attached conftest input and trace the parse failure through the path reported at wasm-traversal.h:286. Confirm the mismatch suspected in the issue, then verify that the example no longer crashes or aborts and add a regression test for the input if the existing test structure supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100