ICE on invalid size/alignment in CTFE validation #86193
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
The following code ICEs:
To fix this, this code here needs to properly catch the "invalid size/align" error and turn it into a validation failure:
rust/compiler/rustc_mir/src/interpret/validity.rs
Line 356 in 563ab4a
But for this we first need to make these errors catchable by introducing separate variants into this enum:
rust/compiler/rustc_middle/src/mir/interpret/error.rs
Line 211 in 2779fc1
You can use the existing
InvalidDropFn
variant as a model; it does the same job for invalid drop function pointers in the vtable.Cc @lqd
The text was updated successfully, but these errors were encountered: