-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Incremental recompilation bug while compiling sysroot with -Zmir-opt-level=2 #74946
Comments
I reproduced this ICE locally. On my end I did it by copying the git checkout of rust.git into
well, not 100%, my query stack was a little different:
but it seemed like a similar bug, nonetheless. |
@rustbot modify labels: +I-prioritize |
Assigning |
Now happens for backtrace
It also gives an unstable fingerprint ICE for backtrace
|
The compilation now fails when accessing session in
It looks that $ cat a.rs
fn main() {
if std::env::var("a").is_ok() {
println!("b");
}
}
$ rustc -Zmir-opt-level=3 a.rs -C incremental=incremental
$ rustc -Zmir-opt-level=3 a.rs -C incremental=incremental
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/decoder.rs:425:33
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.57.0-nightly (c02371c44 2021-10-01) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z mir-opt-level=3 -C incremental
query stack during panic:
#0 [optimized_mir] optimizing MIR for `main`
#1 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack |
Correct decoding of foreign expansions during incr. comp. Fixes rust-lang#74946 The original issue was due to a wrong assertion in `expn_hash_to_expn_id`. The secondary issue was due to a mismatch between the encoding and decoding paths for expansions that are created after the TyCtxt is created.
Correct decoding of foreign expansions during incr. comp. Fixes rust-lang#74946 The original issue was due to a wrong assertion in `expn_hash_to_expn_id`. The secondary issue was due to a mismatch between the encoding and decoding paths for expansions that are created after the TyCtxt is created.
Correct decoding of foreign expansions during incr. comp. Fixes rust-lang#74946 The original issue was due to a wrong assertion in `expn_hash_to_expn_id`. The secondary issue was due to a mismatch between the encoding and decoding paths for expansions that are created after the TyCtxt is created.
I can confirm it works now. Pushed bjorn3/rustc_codegen_cranelift@1e5569d to re-enable incremental compilation for compiling the sysroot. |
Code
Assuming that you copied
$(rustc --print sysroot)/lib/rustlib/src/rust
to./sysroot_src
.Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: