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
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: