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 TryMutex implements Sync for all types T:
This should probably be bounded by T: Send just like the standard library's Mutex, otherwise it allows smuggling non-Send types like Rc across thread-boundaries like so:
Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed that
TryMutex
implementsSync
for all typesT
:try-mutex/src/lib.rs
Line 127 in 9775aef
This should probably be bounded by
T: Send
just like the standard library's Mutex, otherwise it allows smuggling non-Send types likeRc
across thread-boundaries like so:This outputs:
and can lead to data races from safe Rust code.
The text was updated successfully, but these errors were encountered: