-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
ICE: interpret const eval failure of Unevaluated(UnevaluatedConst
#125476
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Reduces further: pub struct Data([u8; usize::MAX >> 16]);
const _: &'static Data = unsafe { &*(&[] as *const Data) }; |
Further: pub struct Data([u8; usize::MAX >> 16]);
const _: &'static [Data] = &[]; The slice construction is what matters it seems, this doesn't trigger it: pub struct Data([u8; usize::MAX >> 16]);
const _: &'static Data = &Data([0; usize::MAX >> 16]); |
This looks suspiciously like what Ralf hinted at in #124516 (comment) |
Yeah that's exactly what this is. :) Will be fixed by #133704. |
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Dec 3, 2024
Rollup merge of rust-lang#133704 - RalfJung:promoted-size-overflow-ice, r=compiler-errors fix ICE when promoted has layout size overflow Turns out there is no reason to distinguish `tainted_by_errors` and `can_be_spurious` here, we can just track whether we allow this even in "infallible" constants. Fixes rust-lang#125476
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this issue
Dec 4, 2024
…iler-errors fix ICE when promoted has layout size overflow Turns out there is no reason to distinguish `tainted_by_errors` and `can_be_spurious` here, we can just track whether we allow this even in "infallible" constants. Fixes rust-lang/rust#125476
lnicola
pushed a commit
to lnicola/rust-analyzer
that referenced
this issue
Dec 11, 2024
…iler-errors fix ICE when promoted has layout size overflow Turns out there is no reason to distinguish `tainted_by_errors` and `can_be_spurious` here, we can just track whether we allow this even in "infallible" constants. Fixes rust-lang/rust#125476
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
latest manually reduced form:
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/gh-matthiaskrgr/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: