update description for issue in 'bunch' crate

This commit is contained in:
Youngsuk Kim
2021-01-25 17:39:13 -05:00
committed by GitHub
parent bcb1204ff2
commit ef367f1766

View File

@@ -10,9 +10,9 @@ categories = ["memory-corruption"]
patched = []
```
# `impl Sync for Bunch<T>` needs a Sync bound on T
# Bunch<T> unconditionally implements Send/Sync
Affected versions of this crate unconditionally implements `Sync` for `Bunch<T>`.
This allows users to insert `T: !Sync` to `Bunch<T>`. It is possible to create a data race to a `T: !Sync` by invoking the `Bunch::get()` API (which returns `&T`) from multiple threads.
Affected versions of this crate unconditionally implements `Send`/`Sync` for `Bunch<T>`.
This allows users to insert `T: !Sync` to `Bunch<T>`. It is possible to create a data race to a `T: !Sync` by invoking the `Bunch::get()` API (which returns `&T`) from multiple threads. It is also possible to send `T: !Send` to other threads by inserting `T` inside `Bunch<T>` and sending `Bunch<T>` to another thread, allowing to create a data race by inserting types like `T = Rc<_>`.
Such data races can lead to memory corruption.