Stream: git-wasmtime

Topic: wasmtime / PR #7638 Discard 0-sized writes to files


view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2023 at 22:42):

alexcrichton opened PR #7638 from alexcrichton:fix-pwrite-behavior to bytecodealliance:main:

This commit comes from #7633 where Windows and Unix would behave differently when writing at a particular file offset. Notably Unix semantics [indicate]:

Before any action described below is taken, and if nbyte is zero
and the file is a regular file, the write() function may detect
and return errors as described below. In the absence of errors,
or if error detection is not performed, the write() function
shall return zero and have no other results. If nbyte is zero and
the file is not a regular file, the results are unspecified.

These semantics are a bit easier to emulate on Windows so the host implementation now discards any attempt to perform I/O if a zero-sized write is detected.

[indicate]: https://man7.org/linux/man-pages/man3/write.3p.html

Closes #7633

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2023 at 22:42):

alexcrichton requested pchickey for a review on PR #7638.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2023 at 22:42):

alexcrichton requested wasmtime-core-reviewers for a review on PR #7638.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2023 at 23:00):

pchickey submitted PR review:

Seems like a good fix to me. Thanks

view this post on Zulip Wasmtime GitHub notifications bot (Dec 06 2023 at 16:12):

alexcrichton updated PR #7638.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 06 2023 at 16:13):

alexcrichton has enabled auto merge for PR #7638.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 28 2024 at 19:49):

alexcrichton commented on PR #7638:

Took me quite some time to set aside time to debug this failure on Windows, and it turned up https://github.com/bytecodealliance/system-interface/pull/43

view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2024 at 00:07):

alexcrichton updated PR #7638.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2024 at 00:07):

alexcrichton has enabled auto merge for PR #7638.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 14 2024 at 00:58):

alexcrichton merged PR #7638.


Last updated: Dec 23 2024 at 12:05 UTC