-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[WasmFS] Fix standalone wasm printing, newline instead of 0 #16076
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to not append any new characters and just pass the user data through untouched?
If not, LGTM 👍
No, I was confused at first too, but I think this function is used to implement |
The old wasmtime fails here. I was testing on a newer one locally which is why I didn't notice before now. Bump the version from 0.8.0 to 0.18.0. The newer version no longer has the bug, and the test should pass. |
The new wasmtime now warns when sent an invalid clock_id. The extra warning makes the test fail. Bumping to latest 0.33.0, that now aborts the entire VM on an invalid clock_id. @sbc100 you follow WASI, is that correct? I can't seem to find online docs for what the WASI clock APIs should do (I find what the functions are, but not how they should handle errors). I would expect an invalid input to lead to an error code (0.8.0) not a printed warning (0.18.0) or a VM fault (0.33.0)... |
Hmm.. I don't remember now. Do you want me to take a look at doing the wasmtime update as a separate PR? Presumably we can fix the issue by not passing an invalid value for clock_id? |
We could work around it, but that would increase code size which sounds unfortunate if it is a wasmtime bug... I'll file an issue there. |
Filed bytecodealliance/wasmtime#3714 I guess let's hold off on this PR and/or upgrading wasmtime for now. |
Includes added couple of extra checks when calling `__wasi_clock` functions. These only apply to standlone builds as the non-standalone builds implement these functions directly in JS. See #16076
I created a standalone PR work around the issue: #16091 It only effects STANDALONE_WASM mode so I don't think two extra conditional should worry us. |
Includes added couple of extra checks when calling `__wasi_clock` functions. These only apply to standlone builds as the non-standalone builds implement these functions directly in JS. See #16076
Includes added couple of extra checks when calling `__wasi_clock` functions. These only apply to standlone builds as the non-standalone builds implement these functions directly in JS. See #16076
0 works in some places but at least in wasmtime it does not.