Skip to content

ICE(s?) with debug assertions enabled in rustc_trait_selection #102074

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

Closed
saethlin opened this issue Sep 20, 2022 · 2 comments · Fixed by #102489
Closed

ICE(s?) with debug assertions enabled in rustc_trait_selection #102074

saethlin opened this issue Sep 20, 2022 · 2 comments · Fixed by #102489
Assignees
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-debug-assertions This issue requires a build of rustc or tooling with debug-assertions in some way T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@saethlin
Copy link
Member

Meta

These are from the crater runs on #101929

Error output

There are quite a few crates in the crater run which hit this assertion, I'm just picking out 3 examples that look kind of representative to me. If you want more examples, search through the build-fail crates. The majority of failures are in there, for whatever reason.

https://crater-reports.s3.amazonaws.com/pr-101929/try%233bbb5242a8064de4ca3af4036745ddf603ddaa85/reg/EasyCrypto-0.8.1/log.txt

[INFO] [stderr] thread 'rustc' panicked at 'assertion failed: `(left == right)`
[INFO] [stderr]   left: `Binder(<[u8; _] as std::clone::Clone>, [])`,
[INFO] [stderr]  right: `Binder(<[u8; 16] as std::clone::Clone>, [])`', compiler/rustc_trait_selection/src/traits/codegen.rs:26:5

https://crater-reports.s3.amazonaws.com/pr-101929/try%233bbb5242a8064de4ca3af4036745ddf603ddaa85/reg/holochain_deterministic_integrity-0.0.13/log.txt

[INFO] [stderr] thread 'rustc' panicked at 'assertion failed: `(left == right)`
[INFO] [stderr]   left: `Binder(<to_local_types_test_nested::Nesting as holochain_deterministic_integrity::prelude::EnumVariantLen<#[hdk_to_coordinates(nested)]>>, [])`,
[INFO] [stderr]  right: `Binder(<to_local_types_test_nested::Nesting as holochain_deterministic_integrity::prelude::EnumVariantLen<0>>, [])`', compiler/rustc_trait_selection/src/traits/codegen.rs:26:5

https://crater-reports.s3.amazonaws.com/pr-101929/try%233bbb5242a8064de4ca3af4036745ddf603ddaa85/reg/pluser-3.0.0/log.txt

[INFO] [stderr] thread 'rustc' panicked at 'assertion failed: `(left == right)`
[INFO] [stderr]   left: `Binder(<accumulator::Accumulator as ink_lang::reflect::DispatchableConstructorInfo</// Holds a simple `i32` value that can be incremented and decremented.
[INFO] [stderr]     #[ink(storage)]
[INFO] [stderr]     pub struct Accumulator {
[INFO] [stderr]         value: i32,
[INFO] [stderr]     }>>, [])`,
[INFO] [stderr]  right: `Binder(<accumulator::Accumulator as ink_lang::reflect::DispatchableConstructorInfo<2611912030>>, [])`', compiler/rustc_trait_selection/src/traits/codegen.rs:26:5
@saethlin saethlin added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 20, 2022
@matthiaskrgr matthiaskrgr added the requires-debug-assertions This issue requires a build of rustc or tooling with debug-assertions in some way label Sep 21, 2022
@compiler-errors
Copy link
Member

Thanks for filing these. I'll take a deeper look into them in a few days.

@compiler-errors compiler-errors self-assigned this Sep 21, 2022
@compiler-errors
Copy link
Member

Sorry for taking so long on this, I have been sick. I minimized this and have a fix incoming:

#![feature(generic_const_exprs)]

#[derive(Debug, Clone)]
pub struct Aes128CipherKey([u8; Aes128Cipher::KEY_LEN]);

impl Aes128CipherKey {
    pub fn New(key: &[u8; Aes128Cipher::KEY_LEN]) -> Self {
        Self(key.clone())
    }
}

#[derive(Debug, Clone)]
pub struct Aes128Cipher;

impl Aes128Cipher {
    const KEY_LEN: usize = 16;
}

fn main() {}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-debug-assertions This issue requires a build of rustc or tooling with debug-assertions in some way T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants