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

fix(util): make intrusive list links never Unpin #97

Merged
merged 1 commit into from
Mar 28, 2021

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Mar 28, 2021

In light of rust-lang/rust#82834, we must ensure that the intrusive
linked list pointers never get mutable-noalias optimizations (see also
rust-lang/rust#63818). Adding a PhantomPinned to the Links struct
ensures it will always be !Unpin, disabling mutable-noalias.

Signed-off-by: Eliza Weisman [email protected]

@hawkw hawkw self-assigned this Mar 28, 2021
Copy link
Collaborator

@iximeow iximeow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

learning cool facts about the rust language today, wow

Copy link
Collaborator

@mystor mystor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

In light of rust-lang/rust#82834, we must ensure that the intrusive
linked list pointers never get mutable-noalias optimizations (see also
rust-lang/rust#63818). Adding a `PhantomPinned` to the `Links` struct
ensures it will always be `!Unpin`, disabling mutable-noalias.

Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw merged commit 5e6ec3e into main Mar 28, 2021
@hawkw hawkw deleted the eliza/never-unpin-ptrs branch March 28, 2021 20:53
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.

3 participants