Skip to content

Compiler panic with '-Z instrument-coverage' on 1.48.0 w/ RUSTC_BOOTSTRAP=1 #81669

Closed
@timkordas

Description

@timkordas

Meta

Compiler panic with '-Z instrument-coverage' on 1.48.0 w/ RUSTC_BOOTSTRAP=1

Running with RUSTC_BOOTSTRAP=1

$ RUSTC_BOOTSTRAP=1 RUST_BACKTRACE=1 rustc --version --verbose
rustc 1.48.0 (7eac88abb 2020-11-16)
binary: rustc
commit-hash: 7eac88abb2e57e752f3302f02be5f3ce3d7adfb4
commit-date: 2020-11-16
host: x86_64-apple-darwin
release: 1.48.0
LLVM version: 11.0

Error output

$ RUSTC_BOOTSTRAP=1 RUST_BACKTRACE=1 cargo test -p workflow
   Compiling typenum v1.12.0
   Compiling once_cell v1.5.2
   Compiling serde_json v1.0.61
   Compiling percent-encoding v2.1.0
   Compiling slab v0.4.2
   Compiling matches v0.1.8
   Compiling pin-utils v0.1.0
   Compiling ahash v0.4.7
   Compiling futures-io v0.3.12
   Compiling byteorder v1.4.2
error: internal compiler error: compiler/rustc_mir/src/transform/instrument_coverage.rs:411:14: start.file.name should be a RealFileName, but it was: Real(Devirtualized { local_path: "/Users/tim/.rustup/toolchains/1.48.0-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/macros/mod.rs", virtual_name: "/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/macros/mod.rs" })

thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:945:9
stack backtrace:
   Compiling tinyvec_macros v0.1.0
   0: std::panicking::begin_panic
   1: rustc_errors::HandlerInner::bug
   2: rustc_errors::Handler::bug
   3: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
   4: rustc_middle::ty::context::tls::with_opt::{{closure}}
   5: rustc_middle::ty::context::tls::with_opt
   6: rustc_middle::util::bug::opt_span_bug_fmt
   7: rustc_middle::util::bug::bug_fmt
   8: rustc_mir::transform::instrument_coverage::Instrumentor::inject_statement
   9: <rustc_mir::transform::instrument_coverage::InstrumentCoverage as rustc_mir::transform::MirPass>::run_pass
  10: rustc_mir::transform::run_passes
  11: rustc_mir::transform::mir_promoted
  12: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_promoted>::compute
  13: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  14: rustc_data_structures::stack::ensure_sufficient_stack
  15: rustc_query_system::query::plumbing::get_query_impl
  16: rustc_mir::borrow_check::mir_borrowck
  17: core::ops::function::FnOnce::call_once
  18: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_borrowck>::compute
  19: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  20: rustc_data_structures::stack::ensure_sufficient_stack
  21: rustc_query_system::query::plumbing::get_query_impl
  22: rustc_mir::borrow_check::type_check::TypeChecker::check_rvalue
  23: rustc_mir::borrow_check::type_check::TypeChecker::typeck_mir
  24: rustc_mir::borrow_check::type_check::type_check
  25: rustc_mir::borrow_check::nll::compute_regions
  26: rustc_mir::borrow_check::do_mir_borrowck
  27: rustc_infer::infer::InferCtxtBuilder::enter
  28: rustc_mir::borrow_check::mir_borrowck
  29: core::ops::function::FnOnce::call_once
  30: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_borrowck>::compute
  31: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  32: rustc_data_structures::stack::ensure_sufficient_stack
  33: rustc_query_system::query::plumbing::get_query_impl
  34: rustc_query_system::query::plumbing::ensure_query_impl
  35: rustc_session::utils::<impl rustc_session::session::Session>::time
  36: rustc_interface::passes::analysis
  37: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  38: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  39: rustc_data_structures::stack::ensure_sufficient_stack
  40: rustc_query_system::query::plumbing::get_query_impl
  41: rustc_interface::passes::QueryContext::enter
  42: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  43: rustc_span::with_source_map
  44: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.48.0 (7eac88abb 2020-11-16) running on x86_64-apple-darwin

note: compiler flags: -Z instrument-coverage -C embed-bitcode=no -C debuginfo=2 --crate-type lib

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

query stack during panic:
#0 [mir_promoted] processing `<unsync::Lazy<T, F> as std::ops::DerefMut>::deref_mut::{closure#0}`
#1 [mir_borrowck] borrow-checking `<unsync::Lazy<T, F> as std::ops::DerefMut>::deref_mut::{closure#0}`
#2 [mir_borrowck] borrow-checking `<unsync::Lazy<T, F> as std::ops::DerefMut>::deref_mut`
#3 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error

error: could not compile `once_cell`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: internal compiler error: compiler/rustc_mir/src/transform/instrument_coverage.rs:411:14: start.file.name should be a RealFileName, but it was: Real(Devirtualized { local_path: "/Users/tim/.rustup/toolchains/1.48.0-x86_64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/macros.rs", virtual_name: "/rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/macros.rs" })

thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:945:9
stack backtrace:
   0: std::panicking::begin_panic
   1: rustc_errors::HandlerInner::bug
   2: rustc_errors::Handler::bug
   3: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
   4: rustc_middle::ty::context::tls::with_opt::{{closure}}
   5: rustc_middle::ty::context::tls::with_opt
   6: rustc_middle::util::bug::opt_span_bug_fmt
   7: rustc_middle::util::bug::bug_fmt
   8: rustc_mir::transform::instrument_coverage::Instrumentor::inject_statement
   9: <rustc_mir::transform::instrument_coverage::InstrumentCoverage as rustc_mir::transform::MirPass>::run_pass
  10: rustc_mir::transform::run_passes
  11: rustc_mir::transform::mir_promoted
  12: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_promoted>::compute
  13: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  14: rustc_data_structures::stack::ensure_sufficient_stack
  15: rustc_query_system::query::plumbing::get_query_impl
  16: rustc_mir::borrow_check::mir_borrowck
  17: core::ops::function::FnOnce::call_once
  18: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_borrowck>::compute
  19: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  20: rustc_data_structures::stack::ensure_sufficient_stack
  21: rustc_query_system::query::plumbing::get_query_impl
  22: rustc_mir::borrow_check::type_check::TypeChecker::check_rvalue
  23: rustc_mir::borrow_check::type_check::TypeChecker::typeck_mir
  24: rustc_mir::borrow_check::type_check::type_check
  25: rustc_mir::borrow_check::nll::compute_regions
  26: rustc_mir::borrow_check::do_mir_borrowck
  27: rustc_infer::infer::InferCtxtBuilder::enter
  28: rustc_mir::borrow_check::mir_borrowck
  29: core::ops::function::FnOnce::call_once
  30: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::mir_borrowck>::compute
  31: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  32: rustc_data_structures::stack::ensure_sufficient_stack
  33: rustc_query_system::query::plumbing::get_query_impl
  34: rustc_query_system::query::plumbing::ensure_query_impl
  35: rustc_session::utils::<impl rustc_session::session::Session>::time
  36: rustc_interface::passes::analysis
  37: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  38: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  39: rustc_data_structures::stack::ensure_sufficient_stack
  40: rustc_query_system::query::plumbing::get_query_impl
  41: rustc_interface::passes::QueryContext::enter
  42: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  43: rustc_span::with_source_map
  44: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.48.0 (7eac88abb 2020-11-16) running on x86_64-apple-darwin

note: compiler flags: -Z instrument-coverage -C embed-bitcode=no -C debuginfo=2 --crate-type bin

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

query stack during panic:
#0 [mir_promoted] processing `op::write_op_macro::{closure#7}`
#1 [mir_borrowck] borrow-checking `op::write_op_macro::{closure#7}`
#2 [mir_borrowck] borrow-checking `op::write_op_macro`
#3 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error

error: build failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions