-
Notifications
You must be signed in to change notification settings - Fork 715
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
On Darwin, fd_pwrite
should respect offset even with append flag
#3389
Labels
bug
Something isn't working
Comments
yagehu
added a commit
to yagehu/WasmEdge
that referenced
this issue
May 7, 2024
This commit makes the `fd_pwrite` behave as specified by POSIX when the fd was opened with the `append` flag. Specifically, [POSIX][1] says that `pwrite` should write to the specified offset "regardless of whether O_APPEND is set". fixes WasmEdge#3389 [1]: https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/
yagehu
added a commit
to yagehu/WasmEdge
that referenced
this issue
May 7, 2024
This commit makes the `fd_pwrite` behave as specified by POSIX when the fd was opened with the `append` flag. Specifically, [POSIX][1] says that `pwrite` should write to the specified offset "regardless of whether O_APPEND is set". fixes WasmEdge#3389 [1]: https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/ Signed-off-by: Yage Hu <me@huyage.dev>
yagehu
added a commit
to yagehu/WasmEdge
that referenced
this issue
May 7, 2024
This commit makes the `fd_pwrite` behave as specified by POSIX when the fd was opened with the `append` flag. Specifically, [POSIX][1] says that `pwrite` should write to the specified offset "regardless of whether O_APPEND is set". fixes WasmEdge#3389 [1]: https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/ Signed-off-by: Yage Hu <me@huyage.dev>
yagehu
added a commit
to yagehu/WasmEdge
that referenced
this issue
May 8, 2024
This commit makes the `fd_pwrite` behave as specified by POSIX when the fd was opened with the `append` flag. Specifically, [POSIX][1] says that `pwrite` should write to the specified offset "regardless of whether O_APPEND is set". fixes WasmEdge#3389 [1]: https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/ Signed-off-by: Yage Hu <me@huyage.dev>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
I reported this issue with WasmEdge on Linux in #3062. Because of the pwrite/append bug on Linux, other runtimes behave similar to WasmEdge (with the exception of Wasmtime). However, WasmEdge behavior diverges on Darwin.
Specifically, Darwin does not have the Linux pwrite/append bug, so pwrite should write to the specified offset even with append flag.
Current State
No response
Expected State
No response
Reproduction steps
This repro is taken from #3062. Compare the produced file between WasmEdge and some other runtime, e.g. Wasmtime.
Screenshots
Any logs you want to share for showing the specific issue
No response
Components
CLI
WasmEdge Version or Commit you used
0f11476
Operating system information
Mac OS Darwin Kernel Version 23.4.0
Hardware Architecture
amd64
Compiler flags and options
No response
The text was updated successfully, but these errors were encountered: