You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user provides a layout with a big enough size, the allocator
might panic on an unwrap instead of returning an error. The reason is
that, even though the layout size is properly rounded to a power of
two, Layout::from_size_align() will fail if the size overflows isize
when rounded to the layout alignment.
Fix this by handling the error instead of unwrapping it.
Keep an unwrap in the HoleList::deallocate() as the validity of the
layout must be guaranteed by the caller since it is an unsafe
function.
0 commit comments