Skip to content

Commit ea9f83b

Browse files
authored
Merge pull request #481 from RalfJung/deliberate-ub
deliberate-ub: mention the load-load races in tokio
2 parents 2f7bf40 + 6c5c69f commit ea9f83b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: resources/deliberate-ub.md

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ We should evaluate whether there truly is some use-case here that is not current
1919
see the [discussion here](https://github.com/rust-lang/unsafe-code-guidelines/issues/449).<br>
2020
The alternative is to not use the "fast path" for problematic types (and fall back to the SeqLock), but that requires some way to query at `const`-time whether the type contains padding (or provenance).
2121
(Or of course one can use inline assembly, but it would be better if that was not required.)
22+
* tokio causes race conditions between atomic and non-atomic loads which are [not permitted](https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses);
23+
see [this issue](https://github.com/tokio-rs/tokio/issues/6155) for details.
2224

2325
### Cases related to aliasing
2426

0 commit comments

Comments
 (0)