-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Deny unsafe ops in unsafe fns in std::sys_common
#73928
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
91df7d3
to
65c4b9c
Compare
This comment has been minimized.
This comment has been minimized.
65c4b9c
to
f529c73
Compare
This comment has been minimized.
This comment has been minimized.
@LeSeulArtichaut any updates on this? |
Ping from triage. There's still merge conflicts. Any updates? |
Sorry for being so slow to respond. I'm currently rebasing this PR, I should be able to update this PR soon. |
8eda097
to
20e0f12
Compare
Resolved the conflicts, and CI should pass now. |
20e0f12
to
a04a2fa
Compare
// Docs for GlobalAlloc::realloc require this to be valid: | ||
let new_layout = Layout::from_size_align_unchecked(new_size, old_layout.align()); | ||
// SAFETY: as stated in docs for GlobalAlloc::realloc, the caller | ||
// must guarantee that `new_size` is valid for a `Layout`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put any guarantees the caller must make in a documentation comment on the function.
☔ The latest upstream changes (presumably #77436) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
@LeSeulArtichaut Ping from triage, any updates on this? |
1 similar comment
@LeSeulArtichaut Ping from triage, any updates on this? |
@LeSeulArtichaut I'm gonna close this due to inactivity. Feel free to reopen or create a new PR when you're ready to work on this. Thanks! |
Helps with #73904.
I wasn't able to properly document some unsafety used in
thread_local.rs
, because the system-dependent unsafe functions it uses aren't documented. I'll be happy to help if any team member has some time to walk me through those functions, but I think that can be done in a separate PR.This should be merged after (or alongside) #73909 because #73909 enables the
#![feature(unsafe_block_in_unsafe_fn)]
needed for this PR.