You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed that the CopyCell object implements Send as long as the underlying type implements Copy.
Main Thread: 0x7ffe19babd1c
Other Thread: 0x7ffe19babd1c
Indicating that the same Cell is now usable across threads, potentially allowing for data races.
The text was updated successfully, but these errors were encountered:
ammaraskar
changed the title
CopyCell allows synchronous use of non-Sync types through references
CopyCell allows concurrent use of non-Sync types through references
Jan 19, 2021
Once a fix is released to crates.io, please open a pull request to update the advisory with the patched version, or file an issue on the advisory database repository.
Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed that the
CopyCell
object implementsSend
as long as the underlying type implementsCopy
.However, one potential problem with this is that (non-mutable) references actually implement the
Copy
trait: https://doc.rust-lang.org/std/marker/trait.Copy.html#impl-Copy-71This makes it possible, for example, to share
Cell
s across threads by wrapping them in aCopyCell
:Output:
Indicating that the same
Cell
is now usable across threads, potentially allowing for data races.The text was updated successfully, but these errors were encountered: