-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty args array in WASI is problematic #40196
Comments
cc @sunfishcode, is this something wasi libc should be doing instead of wasi impls? the current wasi text seems to not have any details on the expectations here. |
Yeah, I dunno. There's also the consideration that the |
I think in this case, it comes down to what the WASI people want to define for the virtual system, independent of the actual underlying system.
It looks like that's what our docs currently state, minus any bits about some libraries/apps expecting it to be set. |
Yeah, this is the additional bit I'm suggesting would be appropriate. I do like the idea that libc-wasi should be handling this part for us. Let's see where that conversation leads tho. |
If we're going to automatically fix up Should we make this change? On one hand, POSIX and systems in practice seem ok with What should the
How does that sound? |
That sounds like a reasonable approach for me. Let's see what others think. |
thanks for your input dan. i think my personal preference would be to not have any default argv[0], but i can see the use in the outlined approach. |
/cc @cjihrig
In the
new WASI(...)
constructor, if theargs
option is not given, then there will be noargs[0]
available, which causes some problems with some libc-wasm compiled libraries (e.g. zstd). The question is whether we can reasonably default anargs[0]
whenargs
is not provided.The text was updated successfully, but these errors were encountered: