rust-lang/unsafe-code-guidelines
Forum for discussion about what unsafe code can and can't do
Apache-2.0
Issues
- 10
Should values be well-typed?
#561 opened by ia0 - 10
- 12
`repr(C)`/`extern "C"` does not always match the current target's C toolchain (when that target is windows-msvc)
#521 opened by RalfJung - 5
Just how unspecified is repr Rust over extern C?
#563 opened by CAD97 - 2
Copy propagation on "move" assignments introduces UB (using Miri/MiniRust semantics)
#556 opened by RalfJung - 0
What is the operational spec for `use` expressions?
#564 opened by RalfJung - 71
Should we / can we make MaybeUninit<T> always preserve all bytes of T (including padding)?
#518 opened by RalfJung - 8
Possible to interleave `&mut` and `&` safely?
#562 opened by joshlf - 5
- 90
Stabilize having the concept of "validity invariant" and "safety invariant"? Under which name?
#539 opened by RalfJung - 16
Reading Pointer bytes as Integers
#547 opened by chorman0773 - 3
Do you need UnsafeCell to mutate through a mut pointer behind a shared ref?
#559 opened by coffeenotfound - 2
- 5
- 4
How to explain linker symbols used as integers (and not pointers to an allocation)?
#554 opened by ia0 - 11
What are the validity requirements of wide pointers/references with `dyn Trait` tail?
#516 opened by RalfJung - 1
Do typed copies of unions preserve "invalid" bytes?
#555 opened by jswrenn - 2
Externally initialized memory and the abstract machine
#553 opened by anp - 21
"Any two types with size 0 and alignment 1 are ABI-compatible" vs the Windows ABI
#552 opened by RalfJung - 1
Does the Allocator API allow sending pointer ownership across an FFI boundary?
#550 opened by not-an-aardvark - 10
- 28
- 2
- 4
- 19
Where does one instance of the Rust Abstract Machine end and another one start?
#543 opened by VorpalBlade - 3
What about: distributed slices (linkme)
#545 opened by CAD97 - 0
Wait, how does placing ZST statics work again?
#546 opened by workingjubilee - 2
Will destructors create `&mut` references only when `Drop::drop()` is called?
#542 opened by theemathas - 48
Packing pointers into double-word width atomics
#517 opened by eggyal - 9
What are the special magic rules around `malloc`?
#535 opened by RalfJung - 1
- 0
Is pattern evaluation order guaranteed?
#540 opened by zachs18 - 5
- 41
How can I tell the Rust compiler `&mut [u8]` has changed after a DMA operation
#537 opened by schultetwin1 - 1
- 8
- 6
- 4
Do ZST `Box`es violate provenance monotonicity?
#529 opened by joshlf - 8
- 9
Can FFI code use `memory_order_consume`
#528 opened by chorman0773 - 4
- 40
What are the soundness requirements for `dlopen`?
#525 opened by RalfJung - 19
What do we say about the equality of pointers in constants, vtables, and function pointers?
#522 opened by RalfJung - 4
Is it UB to have a mutable reference that could be misused, or simply to misuse it?
#524 opened by clarfonthey - 5
- 4
- 3
- 3
- 5
- 16
Validity of a `char` value that is a surrogate
#513 opened by celinval