You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wasm-opt [parse exception: popping from empty stack (at 0:543)] #8896
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)
Binaryen and wasm-tools both agree that this module is invalid, so there is no Binaryen bug here. It does sound plausible that a mismatch in prototype and definition signatures would cause this, but then the bug would be in the original program and not even in LLVM.
Activity
tlively commentedon Jul 13, 2026
Binaryen and wasm-tools both agree that this module is invalid, so there is no Binaryen bug here. It does sound plausible that a mismatch in prototype and definition signatures would cause this, but then the bug would be in the original program and not even in LLVM.
vapier commentedon Jul 13, 2026
at the very least, the diagnostics shown to users are bad. an assert/abort/coredump is not how well defined tools behave.
if the runtime wants to assert matching function definitions, then somewhere in the stack that diagnostic should show up.