WebAssembly / WebAssembly/binaryen
The wasm-reduce tool encountered an abnormal timeout under the condition of "--command=./wasmer run test.wasm"
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
Phenomenon description
Hello, when I use the wasm-reduce tool to shorten the wasm program, there is an abnormal timeout. The command in --command exits normally when executed separately in the terminal, and the exit code is 0. But when using the wasm-reduce tool, the execution is as follows:
Commands from other runtime tools can be executed normally, as follows:
Steps to reproduce
// hello_world.c
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
emcc hello_world.c -o hello_world.wasm -O2 -s WASM=1
/bin/wasm-reduce hello_world.wasm "--command=/path/to/wasmer run test.wasm" -t test.wasm -w work.wasm
Versions and Environment
binaryen is built from source.
- wasm-reduce: version 123 (version_123-229-g6f4e4f7d0)
- wasmer: 6.0.1
- emcc: 4.0.10 (b7dc6e5747465580df5984e723b9d1f10d8e804b)
- wabt: 1.0.27
- Host OS: Ubuntu 22.04.5 LTS x64
- CPU: 12th Gen Intel® Core™ i7-12700 × 20
Extra Info
If you need any other relevant information, please let me know and I will do my best to provide it. Looking forward to your reply! Thank you!
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 timeout with hello_world.c, test.wasm, work.wasm, and the reported wasm-reduce command, then compare it with the separately working runtime commands. Trace the wasm-reduce command-execution path and verify completion when using wasmer; done means the provided reduction no longer reports an abnormal timeout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100