Repository navigation
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
Not totally sure why this happened. When I forgot an extern crate the compiler panicked with the following 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/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.23.0-nightly (e21df8020 2017-11-13) running on x86_64-apple-darwin
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'explicit panic', src/librustc_typeck/check/cast.rs:110:17
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::_print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::begin_panic
6: rustc_typeck::check::cast::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::pointer_kind
7: rustc_typeck::check::cast::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::pointer_kind
8: rustc_typeck::check::cast::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::pointer_kind
9: rustc_typeck::check::cast::CastCheck::check
10: rustc_typeck::check::FnCtxt::check_casts
11: <std::thread::local::LocalKey<T>>::with
12: rustc::ty::context::GlobalCtxt::enter_local
13: _ZN12rustc_typeck5check16typeck_tables_of17h2991cb3aa7f93926E.llvm.5BE90B30
14: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::compute_result
15: _ZN5rustc9dep_graph5graph8DepGraph14with_task_impl17hdc0895b856803ac5E.llvm.E968ED05
16: rustc_errors::Handler::track_diagnostics
17: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
18: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force
19: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
20: rustc::ty::maps::TyCtxtAt::typeck_tables_of
21: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::ensure
22: rustc::session::Session::track_errors
23: _ZN12rustc_typeck5check18typeck_item_bodies17h619021d8d31ccdb0E.llvm.5BE90B30
24: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::compute_result
25: _ZN5rustc9dep_graph5graph8DepGraph14with_task_impl17h09adb0a33cf7a8d7E.llvm.E968ED05
26: rustc_errors::Handler::track_diagnostics
27: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
28: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::force
29: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get
30: rustc::ty::maps::TyCtxtAt::typeck_item_bodies
31: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies
32: rustc_typeck::check_crate
33: <std::thread::local::LocalKey<T>>::with
34: <std::thread::local::LocalKey<T>>::with
35: rustc::ty::context::TyCtxt::create_and_enter
36: rustc_driver::driver::compile_input
37: rustc_driver::run_compiler
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Activity
kennytm commentedon Nov 29, 2017
Hi do you have the code that caused this bug? Thanks!
avadacatavra commentedon Nov 29, 2017
Instead of using
std::cell::{Ref, RefCell, RefMut};, I switched touse accountable_refcell::{RefCell, Ref, RefMut};in https://dxr.mozilla.org/servo/source/components/script/dom/bindings/cell.rs#7accountable_refcell was in the Cargo.toml, but I'd forgotten to put an extern crate in lib.rs. Then I ran ./mach check (equiv to cargo check)
kennytm commentedon Nov 29, 2017
@avadacatavra I just noticed that the nightly version in the report is
rustc 1.23.0-nightly (e21df8020 2017-11-13). Could you update the nightly to the current one (1.24.0-nightly (73bca2b9f 2017-11-28)) and try again?arielb1 commentedon Nov 29, 2017
This reproduces the ICE (on beta but not on stable)
Now the question is whether @avadacatavra had a different reproduction
Deewiant commentedon Dec 22, 2017
Bisecting using @arielb1's latest example points to #44295 as the cause. (Not sure exactly which commit — the three commits preceding 1e9e319 don't compile and I didn't feel like sorting it out.)
arielb1 commentedon Dec 23, 2017
So I found the "real" example:
Rollup merge of rust-lang#97765 - RalfJung:restoration, r=Mark-Simula…
Rollup merge of rust-lang#97765 - RalfJung:restoration, r=Mark-Simula…