I am filing this issue because this project's tests failed in the crater runs for Rust 1.82: https://github.com/rust-lang/rust/issues/130579, you can reproduce this failure with cargo +beta test or cargo +nightly test.
The root cause of this is that at least with_capacity_and_bits is unsound; Layout::from_size_align_unchecked documents a precondition that the allocation size must not exceed isize::MAX: https://doc.rust-lang.org/1.81.0/std/alloc/struct.Layout.html#method.from_size_align, and the now-failing test tries to pass an allocation size of isize::MAX + 1.
I am filing this issue because this project's tests failed in the crater runs for Rust 1.82: https://github.com/rust-lang/rust/issues/130579, you can reproduce this failure with
cargo +beta test
orcargo +nightly test
.The root cause of this is that at least
with_capacity_and_bits
is unsound;Layout::from_size_align_unchecked
documents a precondition that the allocation size must not exceedisize::MAX
: https://doc.rust-lang.org/1.81.0/std/alloc/struct.Layout.html#method.from_size_align, and the now-failing test tries to pass an allocation size ofisize::MAX + 1
.