WASI-based runners don't pass arguments to the WebAssembly instance correctly #3789
Labels
bug
Something isn't working
📦 lib-cli
About wasmer-cli
📦 lib-wasi
About wasmer-wasi
priority-high
High priority issue
Milestone
Describe the bug
@ayys and I found a bug in the way command-line arguments are passed to the WebAssembly instance. It looks like some arguments are being passed in twice, which messes up things for the program being executed.
Steps to reproduce
The output should be just
--eval,console.log(scriptArgs),hello,world,hello world
.It seems like command-line arguments are being sent through twice, but for whatever reason anything with an argument gets skipped.
Additional context
This seems to be an issue in the way arguments are constructed for a WASI-based runner. We tried running
quickjs.wasm
directly and it behaved correctly.A good place to start looking would be here:
wasmer/lib/wasi/src/runners/wasi_common.rs
Lines 70 to 76 in 8a343d0
The text was updated successfully, but these errors were encountered: