vigoo requested pchickey for a review on PR #6812.
vigoo requested wasmtime-core-reviewers for a review on PR #6812.
vigoo opened PR #6812 from vigoo:fix-clock-time-get
to bytecodealliance:main
:
This PR changes the behavior of the
clock_time_get
function implemented in the preview2 adapter in case of being called with an unsupported clock id.Previously it ran onto
unreachable
, with this change it fails withERRNO_BADF
.The motivation is to get the same behavior as the preview1 WASI implementation. (https://github.com/bytecodealliance/wasmtime/blob/bb3734bd724683cce8aa20de0cad9f9086e07b50/crates/wasi/src/preview2/preview1/mod.rs#L759-L760)
(I ran into this difference when tried to run a
ruby.wasm
module converted into a component using the preview2 adapter. Seems like Ruby queries all 4 clocks during startup but handles the BADF response properly.)
vigoo updated PR #6812.
sunfishcode submitted PR review:
Looks good, thanks!
sunfishcode has enabled auto merge for PR #6812.
sunfishcode merged PR #6812.
Last updated: Dec 23 2024 at 12:05 UTC