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
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.
There is some interesting wording in the failing test:
// On 16/32-bit, we check that allocations don't exceed isize::MAX,
// on 64-bit, we assume the OS will give an OOM for such a ridiculous size.
// Any platform that succeeds for these requests is technically broken with
// ptr::offset because LLVM is the worst.
You cannot rely on the underlying allocator to fail in this scenario. Even if the allocator does fail, the execution encounters UB before the abort due to allocation failure, so it is technically wrong to rely on the allocator failing.
The text was updated successfully, but these errors were encountered:
saethlin
changed the title
try_reserve tests execute UB
try_reserve tests execute UB, will fail in Rust 1.82
Sep 20, 2024
The actual test failure seemed to have been caused by an update to Layout.
Yeah, by me. I added a special kind of debug assertion to it. It looks like the standard library code was changed in rust-lang/rust#95295, thanks for the heads-up that you pasted this test from the standard library. Some quick GitHub code search suggests a lot of other people have too 🙃
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.
There is some interesting wording in the failing test:
minivec/tests/vec.rs
Lines 1600 to 1603 in 7573a54
You cannot rely on the underlying allocator to fail in this scenario. Even if the allocator does fail, the execution encounters UB before the abort due to allocation failure, so it is technically wrong to rely on the allocator failing.
The text was updated successfully, but these errors were encountered: