See
|
fn from_inner(ptr: NonNull<ArcInner<T>>) -> Self { |
|
Self { ptr, phantom: PhantomData } |
|
} |
This can be called like
let dangling_arc = Arc::from_inner(NonNull::dangling());
without any unsafe code and results in an Arc to a dangling pointer, which will cause fun when trying to use it.
See
rust/library/alloc/src/sync.rs
Lines 255 to 257 in 0c87288
This can be called like
without any unsafe code and results in an
Arcto a dangling pointer, which will cause fun when trying to use it.