wingo opened PR #12138 from wingo:macos-fadvise-willneed-oob to bytecodealliance:main:
On macos and ios, fadvise is only implemented for WillNeed and dispatches via the system-interface crate to the F_RDADVISE fcntl. If you call WillNeed on an out-of-bounds offset, this fcntl returns FileTooLarge. Here we paper over this harmless error code to avoid this needless platform-dependent nonuniformity. Should fix wasmtime for https://github.com/WebAssembly/wasi-testsuite/issues/178.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
wingo requested wasmtime-wasi-reviewers for a review on PR #12138.
rvolosatovs created PR review comment:
Error(ErrorCode::FileTooLarge) if advice == system_interface::fs::Advice::WillNeed => Ok(()),
rvolosatovs submitted PR review.
rvolosatovs created PR review comment:
into()looks redundant?
rvolosatovs submitted PR review.
wingo updated PR #12138.
wingo updated PR #12138.
Last updated: Dec 13 2025 at 19:03 UTC