Skip to content

Commit 99e3a8e

Browse files
committed
deliberate UB: add crossbeam-deque
1 parent f572fa7 commit 99e3a8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

resources/deliberate-ub.md

Lines changed: 2 additions & 0 deletions
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+
* crossbeam's deque uses [volatile accesses that really should be atomic instead](https://github.com/crossbeam-rs/crossbeam/blob/5a154def002304814d50f3c7658bd30eb46b2fad/crossbeam-deque/src/deque.rs#L70-L88).
23+
They cannot use atomic accesses as those are not possible for arbitrary `T`.
2224

2325
### Cases related to aliasing
2426

0 commit comments

Comments
 (0)