-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Unsoundness mapping/downgrading in RwLock #3344
Labels
A-tokio
Area: The main tokio crate
C-bug
Category: This is a bug.
I-unsound 💥
A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
M-sync
Module: tokio/sync
Comments
Well that's problematic. It was added in #2733. |
AFAIK fixing soundness bug is valid reason to break backwards compatibility. |
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
C-bug
Category: This is a bug.
I-unsound 💥
A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
M-sync
Module: tokio/sync
Version: Tokio 1.0.0
In the code:
We obtain a reference to the Cell as well as a reference to the inner value - this can be seen in the error running Miri on the playground.
This same unsoundness occurred in parking_lot, and they had to remove the
downgrade
API (on mapped guards) as a result. However, this isn't really an option for Tokio now that it's stable.(sorry for the edits, I accidentally posted this before I'd finished writing it)
The text was updated successfully, but these errors were encountered: