-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Issue with write_all_at
on GitHub Action
#140867
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
Comments
This seems to be a know bug. See the Bugs section https://linux.die.net/man/2/pwrite64 |
Btw, die.net hasn't been updated in a long time, use man7.org or distro documentation for manpages. Linux 6.9 introduced RWF_NOAPPEND as a flag to say "no really, do a positioned write even on O_APPEND". https://man7.org/linux/man-pages/man2/pwritev2.2.html |
The flags aren't in libc yet, rust-lang/libc#4452 |
bump std libc dependency Bump libc, it contains prerequisites for a rust-lang#140867 fix
bump std libc dependency Bump libc, it contains prerequisites for a rust-lang#140867 fix
bump std libc dependency Bump libc, it contains prerequisites for a rust-lang#140867 fix
write_all_at
doesn't write the buffer at the given index. The content is written at the end of the file.I created a repo on my github https://github.com/allevo/rust-fs-write-all-bug to show the error.
Locally on Mac M2, the test on that repo passes, but on CI it doesn't.
NB:
write_all_at
andread_exact_at
doesn't change the cursor positionflush
or/andsync_all
doesn't fixI tried this code:
I expected to see this happen: The file content will be [0, 0, 0, 11]
Instead, this happened: [0, 0, 0, 10, 0, 0, 0, 11]
Meta
rustup --version && rustc --version --verbose
:Backtrace
In this case it is not important, the assertion fails
The text was updated successfully, but these errors were encountered: