Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setu32::test_alloc_failures encounters UB, will fail in Rust 1.82 #22

Closed
saethlin opened this issue Sep 20, 2024 · 1 comment
Closed

Comments

@saethlin
Copy link

I am filing this issue because this project's tests failed in the crater runs for Rust 1.82: rust-lang/rust#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.

@droundy
Copy link
Owner

droundy commented Sep 21, 2024

Thanks for the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants