Skip to content

Conversation

Darksonn
Copy link
Contributor

This PR makes the Pointers struct !Unpin to guard against pointers to it being marked noalias by #82834. It also uses raw pointer manipulation to access its fields to avoid the creation of references to those fields.

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-sync Module: tokio/sync labels Mar 27, 2021
@Darksonn Darksonn requested a review from carllerche March 27, 2021 10:29
@Darksonn Darksonn merged commit fee76ea into master Mar 29, 2021
@Darksonn Darksonn deleted the noalias branch March 29, 2021 20:38
@Darksonn Darksonn mentioned this pull request Apr 12, 2021
yvt added a commit to yvt/cryo that referenced this pull request Oct 25, 2021
`!Unpin` is necessary to avoid the `noalias` LLVM attribute on `&mut
State`. A similar fix was done recently in Tokio [1].

[1]: tokio-rs/tokio#3654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-sync Module: tokio/sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants