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

regression: unsafe precondition(s) violated: Layout::from_sign_align_unchecked requires... #130579

Closed
BoxyUwU opened this issue Sep 19, 2024 · 2 comments
Assignees
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@BoxyUwU
Copy link
Member

BoxyUwU commented Sep 19, 2024

[INFO] [stderr] unsafe precondition(s) violated: Layout::from_size_align_unchecked requires that align is a power of 2 and the rounded-up allocation size does not exceed isize::MAX
[INFO] [stdout] test test_split_off ... ok
[INFO] [stderr] stack backtrace:
[INFO] [stderr]    0:     0x5c23fa0b008a - std::backtrace_rs::backtrace::libunwind::trace::h9ce576133d3ff57c
[INFO] [stderr]                                at /rustc/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
[INFO] [stderr]    1:     0x5c23fa0b008a - std::backtrace_rs::backtrace::trace_unsynchronized::h77316b33bca73147
[INFO] [stderr]                                at /rustc/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
[INFO] [stderr]    2:     0x5c23fa0b008a - std::sys::backtrace::_print_fmt::haa182cb1ad45bc9f
[INFO] [stderr]                                at /rustc/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/std/src/sys/backtrace.rs:66:9
[INFO] [stderr]    3:     0x5c23fa0b008a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha95eeb186e57c055
[INFO] [stderr]                                at /rustc/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/std/src/sys/backtrace.rs:39:26

note: if the relevant team already accepted this breakage then this issue can be closed

@BoxyUwU BoxyUwU added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 19, 2024
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 19, 2024
@BoxyUwU BoxyUwU removed the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Sep 19, 2024
@saethlin saethlin self-assigned this Sep 19, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 19, 2024
@saethlin
Copy link
Member

Triage:
minivec has an off-by-one in a test that's testing for OOM behavior, it tries to make a layout for isize::MAX+1 bytes
weakc tries to do Layout::from_size_align_unchecked(0, 0). The docs identify alignment being nonzero as a precondition.
griddle is poking the soundness hole in hashbrown that was fixed in rust-lang/hashbrown#268
tinyset has basically the same off-by-one as minivec

I'll file issues later.

@saethlin
Copy link
Member

Issues filed. Not going to bother the author of weakc; the project already doesn't build on stable due to other UB that crater has suppressed with --cap-lints=warn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants