Skip to content

rustc 1.58.0-nightly : compiler/rustc_mir_transform/src/check_unsafety.rs panick #91777

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

Closed
benoitgillet opened this issue Dec 11, 2021 · 1 comment
Labels
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.

Comments

@benoitgillet
Copy link

Code

fn mutate_vec_at(map : &mut Vec<Vec<u8>>, row_id : usize, cell_id : usize, store : &mut Vec<(usize, usize)>){
    let mut val = map[row_id][cell_id];

    if  val != 0 {
        val += 1;
        if val > 9{
            store.push((row_id, cell_id));
            val = 0;
        }
        map[row_id][cell_id] = val;
    }
}

Meta

rustc --version --verbose:

<version>
rustc 1.58.0-nightly (65f3f8b22 2021-11-21)
binary: rustc
commit-hash: 65f3f8b220f020e562c5dd848ff7319257a7ba45
commit-date: 2021-11-21
host: x86_64-unknown-linux-gnu
release: 1.58.0-nightly
LLVM version: 13.0.0

Error output

thread 'rustc' panicked at 'attempted to read from stolen value: rustc_middle::mir::Body', compiler/rustc_mir_transform/src/check_unsafety.rs:445:36 

 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace 

 error: internal compiler error: unexpected panic 

 note: the compiler unexpectedly panicked. this is a bug. 

 note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md 

 note: rustc 1.58.0-nightly (65f3f8b22 2021-11-21) running on x86_64-unknown-linux-gnu 

 note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin 

 note: some of the compiler flags provided by cargo are hidden 

 query stack during panic: 
#0 [unsafety_check_result] unsafety-checking `MATRIX_SIZE` 
#1 [analysis] running analysis passes on this crate end of query stack

BackTrace

No backtrace, the bug desappeared after a clean and rebuild

@benoitgillet benoitgillet 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 Dec 11, 2021
@benoitgillet
Copy link
Author

Ah, and i see there is a similar PR opened :
#91015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

No branches or pull requests

1 participant