-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE: encode_const: unexpected type [usize; 1]
with -Clto -Zsanitizer=cfi
#100778
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
PG-exploit-mitigations
Project group: Exploit mitigations
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
[usize; 1]
with -Clto -Zsanitizer=cfi
matthiaskrgr
added a commit
to matthiaskrgr/glacier
that referenced
this issue
Aug 21, 2022
Hm so this has always crashed since the introduction of cfisan...? |
Thanks for finding and reporting it! I'll take a look at it soon. |
@rustbot claim |
6 tasks
@rcvalle any updates here? |
@Nilstrieb Sorry for the delay on this. I've been working on rust-lang/rfcs#3296 and #105452 and I'll work on the known issues next. |
#![feature(adt_const_params)]
pub fn function_with_bytes<const BYTES: &'static [u8; 4]>() -> &'static [u8] {
BYTES
}
pub fn main() {
assert_eq!(
function_with_bytes::<{ &[0x41, 0x41, 0x41, 0x41] }>(),
b"AAAA"
);
} |
This was referenced Jul 5, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jul 27, 2023
…ler-errors CFI: Fix ICE: encode_const: unexpected type [usize Fixes rust-lang#100778 and rust-lang#113366, and complements rust-lang#106547 by adding support for encoding const parameters.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
PG-exploit-mitigations
Project group: Exploit mitigations
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Meta
rustc --version --verbose
:Error output
rustc 97007.rs -Clto -Zsanitizer=cfi
Backtrace
The text was updated successfully, but these errors were encountered: