Skip to content
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

Backport #1189 and #1188 to 0.38 #1197

Merged
merged 2 commits into from
Oct 27, 2024
Merged

Backport #1189 and #1188 to 0.38 #1197

merged 2 commits into from
Oct 27, 2024

Conversation

sunfishcode
Copy link
Member

No description provided.

Add a `rustix::fs::ABS` constant, which corresponds to the undocumented
but commonly used convention of using `-EBADF` as the file descriptor in
`openat` and similar calls. This makes them fail if the path is not
absolute.

Fixes #1187.
* Add safety comments for `mmap` etc.

Add proper safety comments for `mmap` and related functions. Many of
the tricky things around `mmap` are about handing out Rust references
to mapped memory, and that technically isn't rustix's responsibility
to worry about, so these safety comments can be pretty simple.

And, several other miscellaneous documentation and comment cleanups.

* Document the new safety precondition for `split_init`.
@sunfishcode sunfishcode merged commit 4f8a508 into 0.38 Oct 27, 2024
45 checks passed
@sunfishcode sunfishcode deleted the 0.38-updates branch October 27, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant