-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 in constprop due to out of bounds access in a zero sized array #69312
Comments
cc @RalfJung did the value visitor changes get merged? |
The ICE seems to be gone on nightly, though. So likely just needs a test (or checking that we already have an appropriate test)? |
@RalfJung Maybe we should also find the PR that fixed this and beta nominate? |
|
Add test for rust-lang#69312 This bug was fixed by rust-lang#67501. Closes rust-lang#69312
That PR is too big to backport. I suggest to just remove the assertion on beta as the ICE is properly fixed on master |
Rollup of 7 pull requests Successful merges: - #68984 (Make `u8::is_ascii` a stable `const fn`) - #69339 (Add test for #69312) - #69346 (Clean up E0323, E0324, E0325 and E0326 explanations) - #69348 (Wrong error message for move_ref_pattern) - #69349 (MIR is not an experiment anymore) - #69354 (Test `Duration::new` panics on overflow) - #69370 (move const_eval.rs into the module folder) Failed merges: r? @ghost
Still need to backport |
The fix is already on beta so backport is unneeded? |
Yeah, playground confirms that this ICEs on stable but works fine on beta and nightly. |
Here's the crashing code I came down to:
main.rs
lib.rs
contains a single line: "pub mod matrix.rs"matrix.rs
with the following code:This happened as I permuted type and size in my array definition. My intention was not to declare a zero sized array but to declare an array filled with zeros. Anyway, the compiler crashed. I noticed that if I remove the
pub
from the line in lib.rs, it compiles fine.Meta
Backtrace:
The text was updated successfully, but these errors were encountered: