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

`Pin` is unsound due to rogue Deref/DerefMut implementations #66544

Open
RalfJung opened this issue Nov 19, 2019 · 5 comments
Open

`Pin` is unsound due to rogue Deref/DerefMut implementations #66544

RalfJung opened this issue Nov 19, 2019 · 5 comments

Comments

@RalfJung
Copy link
Member

@RalfJung RalfJung commented Nov 19, 2019

@comex found a soundness bug in Pin. This issue is to track that.

Discussion is happening on IRLO currently, let's try not to fork that.

@eddyb

This comment has been minimized.

Copy link
Member

@eddyb eddyb commented Nov 29, 2019

I don't think people are necessarily seeing this, pinging all labelled teams:
cc @rust-lang/compiler @rust-lang/lang @rust-lang/libs

@est31

This comment has been minimized.

Copy link
Contributor

@est31 est31 commented Dec 5, 2019

PR with a proposed (partial, thanks @RalfJung) fix: #67039

@RalfJung

This comment has been minimized.

Copy link
Member Author

@RalfJung RalfJung commented Dec 5, 2019

Well, a proposed partial fix.

@xfix

This comment has been minimized.

Copy link
Contributor

@xfix xfix commented Dec 5, 2019

I still think the partial fix is worth it. I don't think we want to resolve this particular issue in any other way. Meanwhile, other soundness issues are more complicated, and can be solved separately from PartialEq issue (my preferred solution would be to prevent DerefMut implementations for &T and Clone implementations for &mut T, but I think this is still being discussed).

@RalfJung

This comment has been minimized.

Copy link
Member Author

@RalfJung RalfJung commented Dec 5, 2019

I still think the partial fix is worth it.

Fully agreed, and thanks for preparing that PR! I was just pointing out that the PR will not be sufficient to consider the problem solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.