-
Notifications
You must be signed in to change notification settings - Fork 7
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
PinSlab<T> and Unordered<T, S> need bounds on their Send/Sync traits #8
Comments
That is indeed a bug that will be fixed. Much obliged! |
Released in |
Thank you for the quick response :) |
@udoprog It seems that there was a small mistake while fixing this issue in 92f40b4. unsafe impl<T, S> Send for Unordered<T, S> where S: Send + Sentinel {}
unsafe impl<T, S> Sync for Unordered<T, S> where S: Sync + Sentinel {} Instead of adding trait bounds for |
Yeah. That does indeed look wrong! I've seen that you've forked the project, so feel free if you want to send a fix. |
This commit is a follow-up fix for the issue raised in #8 (comment) .
Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed that the
PinSlab
:unicycle/src/pin_slab.rs
Lines 43 to 44 in f5a2838
and
Unordered
unicycle/src/lib.rs
Lines 380 to 381 in f5a2838
types implement the
Send
andSync
traits for all types. This should likely be bounded bySend
/Sync
on the contained types otherwise it can lead to data-races from safe Rust code. Here's an example of such a data race withPinSlab
:which outputs:
The text was updated successfully, but these errors were encountered: