-
Notifications
You must be signed in to change notification settings - Fork 397
Open
Labels
UnmaintainedInformational / UnmaintainedInformational / UnmaintainedUnsoundInformational / UnsoundInformational / Unsound
Description
The align_first
function of the maligned
crate manually allocates with an alignment larger than T
, and then uses Vec::from_raw_parts
on that allocation to get a Vec<T>
.
As per the stdlib documentation this violates the GlobalAlloc::dealloc
safety contract and causes undefined behaviour, since the allocation has to have the exact same allocation as T
.
Metadata
Metadata
Assignees
Labels
UnmaintainedInformational / UnmaintainedInformational / UnmaintainedUnsoundInformational / UnsoundInformational / Unsound