Skip to content

Rocket library + option "-C instrument-coverage" crashes the compiler apparently  #95095

Closed
@lsoranco

Description

@lsoranco

I am developing a library that has the Rocket as dependency. Everything seems to work fine when I am just building the library, but when I try to get coverage data, using the LLVM tool, it apparently crashes the compiler

I have no deep knowledge of the compiler, and I am doing this because it popped up as a suggestion in the error, so sorry if something is not correct

Code

I can't do that, as that part is proprietary software I don't own

Meta

rustc --version --verbose:

rustc 1.61.0-nightly (58f11791a 2022-03-17)
binary: rustc
commit-hash: 58f11791af4f97572e7afd83f11cffe04bbbd12f
commit-date: 2022-03-17
host: x86_64-pc-windows-msvc
release: 1.61.0-nightly
LLVM version: 14.0.0

Error output

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/58f11791af4f97572e7afd83f11cffe04bbbd12f\compiler\rustc_middle\src\ty\sty.rs:1089:9
stack backtrace:
   0:     0x7ffb99b9984f - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4920f17f4290f741
   1:     0x7ffb99bcf79a - core::fmt::write::hcf43017332131a27
   2:     0x7ffb99b8c6f9 - <std::io::IoSlice as core::fmt::Debug>::fmt::h15eaf054afd16aee
   3:     0x7ffb99b9cddb - std::panicking::default_hook::h60779a00256769b9
   4:     0x7ffb99b9c9ce - std::panicking::default_hook::h60779a00256769b9
   5:     0x7ffb867d29e9 - <rustc_driver[623323d94d0a178a]::args::Error as core[12339feb03ad56ba]::fmt::Debug>::fmt
   6:     0x7ffb99b9d6ba - std::panicking::rust_panic_with_hook::hdd4e15a6b1c4253b
   7:     0x7ffb99b9d3d2 - <std::panicking::begin_panic_handler::StrPanicPayload as core::panic::BoxMeUp>::get::hb3ad68c3b3cd0c37
   8:     0x7ffb99b9a157 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4920f17f4290f741
   9:     0x7ffb99b9d0e9 - rust_begin_unwind
  10:     0x7ffb99c03245 - core::panicking::panic_fmt::hd420cd5b998f1745
  11:     0x7ffb99c030ec - core::panicking::panic::hc2f71ddc8d3978a9
  12:     0x7ffb8abc2a79 - rustc_trait_selection[e4c1aae9ec890169]::traits::type_known_to_meet_bound_modulo_regions
  13:     0x7ffb89529b74 - rustc_ty_utils[4cc541030619957e]::provide
  14:     0x7ffb8952f675 - rustc_ty_utils[4cc541030619957e]::provide
  15:     0x7ffb89ea4f2f - <rustc_middle[c25cf1c44b340179]::mir::ProjectionElem<rustc_middle[c25cf1c44b340179]::mir::Local, rustc_middle[c25cf1c44b340179]::ty::Ty> as rustc_mir_dataflow[a0aede76b6a26f86]::move_paths::abs_domain::Lift>::lift
  16:     0x7ffb89fd1737 - <rustc_middle[c25cf1c44b340179]::mir::ProjectionElem<rustc_middle[c25cf1c44b340179]::mir::Local, rustc_middle[c25cf1c44b340179]::ty::Ty> as rustc_mir_dataflow[a0aede76b6a26f86]::move_paths::abs_domain::Lift>::lift
  17:     0x7ffb8aecb4b7 - <rustc_middle[c25cf1c44b340179]::ty::Ty>::is_sized
  18:     0x7ffb8adfb2ca - <rustc_middle[c25cf1c44b340179]::ty::layout::LayoutError as core[12339feb03ad56ba]::fmt::Display>::fmt
  19:     0x7ffb8ae16369 - <rustc_middle[c25cf1c44b340179]::ty::layout::LayoutError as core[12339feb03ad56ba]::fmt::Debug>::fmt
  20:     0x7ffb8a013a6b - <rustc_middle[c25cf1c44b340179]::mir::ProjectionElem<rustc_middle[c25cf1c44b340179]::mir::Local, rustc_middle[c25cf1c44b340179]::ty::Ty> as rustc_mir_dataflow[a0aede76b6a26f86]::move_paths::abs_domain::Lift>::lift
  21:     0x7ffb8a22af57 - <rustc_query_impl[25911d5b82bfb407]::Queries as rustc_middle[c25cf1c44b340179]::ty::query::QueryEngine>::try_mark_green
  22:     0x7ffb8ae502b3 - <rustc_target[901cbfbb95c5f103]::abi::Integer as rustc_middle[c25cf1c44b340179]::ty::layout::IntegerExt>::repr_discr
  23:     0x7ffb8ae3e913 - <rustc_middle[c25cf1c44b340179]::ty::relate::GeneratorWitness as core[12339feb03ad56ba]::fmt::Debug>::fmt
  24:     0x7ffb8ae3db15 - <rustc_middle[c25cf1c44b340179]::ty::relate::GeneratorWitness as core[12339feb03ad56ba]::fmt::Debug>::fmt
  25:     0x7ffb8adfb542 - <rustc_middle[c25cf1c44b340179]::ty::layout::LayoutError as core[12339feb03ad56ba]::fmt::Display>::fmt
  26:     0x7ffb8ae16369 - <rustc_middle[c25cf1c44b340179]::ty::layout::LayoutError as core[12339feb03ad56ba]::fmt::Debug>::fmt
  27:     0x7ffb8a013a6b - <rustc_middle[c25cf1c44b340179]::mir::ProjectionElem<rustc_middle[c25cf1c44b340179]::mir::Local, rustc_middle[c25cf1c44b340179]::ty::Ty> as rustc_mir_dataflow[a0aede76b6a26f86]::move_paths::abs_domain::Lift>::lift
  28:     0x7ffb8a22af57 - <rustc_query_impl[25911d5b82bfb407]::Queries as rustc_middle[c25cf1c44b340179]::ty::query::QueryEngine>::try_mark_green
  29:     0x7ffb8ae502b3 - <rustc_target[901cbfbb95c5f103]::abi::Integer as rustc_middle[c25cf1c44b340179]::ty::layout::IntegerExt>::repr_discr
  30:     0x7ffb8ae3e913 - <rustc_middle[c25cf1c44b340179]::ty::relate::GeneratorWitness as core[12339feb03ad56ba]::fmt::Debug>::fmt
  31:     0x7ffb8ae3db15 - <rustc_middle[c25cf1c44b340179]::ty::relate::GeneratorWitness as core[12339feb03ad56ba]::fmt::Debug>::fmt
  32:     0x7ffb8adfb542 - <rustc_middle[c25cf1c44b340179]::ty::layout::LayoutError as core[12339feb03ad56ba]::fmt::Display>::fmt
  33:     0x7ffb8ae16369 - <rustc_middle[c25cf1c44b340179]::ty::layout::LayoutError as core[12339feb03ad56ba]::fmt::Debug>::fmt
  34:     0x7ffb8a013a6b - <rustc_middle[c25cf1c44b340179]::mir::ProjectionElem<rustc_middle[c25cf1c44b340179]::mir::Local, rustc_middle[c25cf1c44b340179]::ty::Ty> as rustc_mir_dataflow[a0aede76b6a26f86]::move_paths::abs_domain::Lift>::lift
  35:     0x7ffb8a22af57 - <rustc_query_impl[25911d5b82bfb407]::Queries as rustc_middle[c25cf1c44b340179]::ty::query::QueryEngine>::try_mark_green
  36:     0x7ffb8ae502b3 - <rustc_target[901cbfbb95c5f103]::abi::Integer as rustc_middle[c25cf1c44b340179]::ty::layout::IntegerExt>::repr_discr
  37:     0x7ffb8ae3e913 - <rustc_middle[c25cf1c44b340179]::ty::relate::GeneratorWitness as core[12339feb03ad56ba]::fmt::Debug>::fmt
  38:     0x7ffb8ae3db15 - <rustc_middle[c25cf1c44b340179]::ty::relate::GeneratorWitness as core[12339feb03ad56ba]::fmt::Debug>::fmt
  39:     0x7ffb8adfb542 - <rustc_middle[c25cf1c44b340179]::ty::layout::LayoutError as core[12339feb03ad56ba]::fmt::Display>::fmt
  40:     0x7ffb8ae16369 - <rustc_middle[c25cf1c44b340179]::ty::layout::LayoutError as core[12339feb03ad56ba]::fmt::Debug>::fmt
  41:     0x7ffb8a013a6b - <rustc_middle[c25cf1c44b340179]::mir::ProjectionElem<rustc_middle[c25cf1c44b340179]::mir::Local, rustc_middle[c25cf1c44b340179]::ty::Ty> as rustc_mir_dataflow[a0aede76b6a26f86]::move_paths::abs_domain::Lift>::lift
  42:     0x7ffb8a22af57 - <rustc_query_impl[25911d5b82bfb407]::Queries as rustc_middle[c25cf1c44b340179]::ty::query::QueryEngine>::try_mark_green
  43:     0x7ffb8a28946f - rustc_codegen_ssa[5660fbb3522d2100]::debuginfo::type_names::compute_debuginfo_type_name
  44:     0x7ffb8a28b278 - rustc_codegen_ssa[5660fbb3522d2100]::debuginfo::type_names::compute_debuginfo_type_name
  45:     0x7ffb8a28865d - rustc_codegen_ssa[5660fbb3522d2100]::debuginfo::type_names::compute_debuginfo_type_name
  46:     0x7ffb86aa95d5 - <rustc_type_ir[c6428a209de515db]::FloatTy as rustc_codegen_llvm[87e4e5664c26885d]::debuginfo::metadata::MsvcBasicName>::msvc_basic_name
  47:     0x7ffb86aa9b03 - <rustc_type_ir[c6428a209de515db]::FloatTy as rustc_codegen_llvm[87e4e5664c26885d]::debuginfo::metadata::MsvcBasicName>::msvc_basic_name
  48:     0x7ffb86aa925b - <rustc_type_ir[c6428a209de515db]::FloatTy as rustc_codegen_llvm[87e4e5664c26885d]::debuginfo::metadata::MsvcBasicName>::msvc_basic_name
  49:     0x7ffb86aa9a35 - <rustc_type_ir[c6428a209de515db]::FloatTy as rustc_codegen_llvm[87e4e5664c26885d]::debuginfo::metadata::MsvcBasicName>::msvc_basic_name
  50:     0x7ffb86987624 - <rustc_codegen_llvm[87e4e5664c26885d]::builder::Builder as core[12339feb03ad56ba]::ops::drop::Drop>::drop
  51:     0x7ffb86a60bbe - <rustc_codegen_llvm[87e4e5664c26885d]::debuginfo::CodegenUnitDebugContext as core[12339feb03ad56ba]::ops::drop::Drop>::drop
  52:     0x7ffb86a3b66f - <rustc_codegen_llvm[87e4e5664c26885d]::context::CodegenCx as rustc_codegen_ssa[5660fbb3522d2100]::traits::debuginfo::DebugInfoMethods>::dbg_scope_fn
  53:     0x7ffb86a3b1ff - <rustc_codegen_llvm[87e4e5664c26885d]::context::CodegenCx as rustc_codegen_ssa[5660fbb3522d2100]::traits::debuginfo::DebugInfoMethods>::create_function_debug_context
  54:     0x7ffb86ab2db3 - <rustc_codegen_llvm[87e4e5664c26885d]::debuginfo::utils::FatPtrKind as core[12339feb03ad56ba]::fmt::Debug>::fmt
  55:     0x7ffb869812e2 - <rustc_codegen_llvm[87e4e5664c26885d]::builder::Builder as core[12339feb03ad56ba]::ops::drop::Drop>::drop
  56:     0x7ffb86a844bc - <rustc_type_ir[c6428a209de515db]::FloatTy as rustc_codegen_llvm[87e4e5664c26885d]::debuginfo::metadata::MsvcBasicName>::msvc_basic_name
  57:     0x7ffb869cbd91 - <rustc_codegen_llvm[87e4e5664c26885d]::base::ValueIter as core[12339feb03ad56ba]::iter::traits::iterator::Iterator>::next
  58:     0x7ffb86a15c61 - <rustc_codegen_llvm[87e4e5664c26885d]::llvm_::archive_ro::Child as core[12339feb03ad56ba]::ops::drop::Drop>::drop
  59:     0x7ffb869cb650 - <rustc_codegen_llvm[87e4e5664c26885d]::base::ValueIter as core[12339feb03ad56ba]::iter::traits::iterator::Iterator>::next
  60:     0x7ffb8697fe99 - <rustc_codegen_llvm[87e4e5664c26885d]::builder::Builder as core[12339feb03ad56ba]::ops::drop::Drop>::drop
  61:     0x7ffb86a452c5 - <rustc_codegen_llvm[87e4e5664c26885d]::LlvmCodegenBackend as rustc_codegen_ssa[5660fbb3522d2100]::traits::backend::CodegenBackend>::codegen_crate
  62:     0x7ffb8694d972 - <rustc_interface[522ddd194916fa36]::passes::boxed_resolver::BoxedResolver>::to_resolver_outputs
  63:     0x7ffb868f6ccd - <rustc_interface[522ddd194916fa36]::passes::LintStoreExpandImpl as rustc_expand[88a889372781db74]::base::LintStoreExpand>::pre_expansion_lint
  64:     0x7ffb868d6a70 - <rustc_interface[522ddd194916fa36]::queries::Queries>::ongoing_codegen
  65:     0x7ffb86735907 - <rustc_target[901cbfbb95c5f103]::asm::hexagon::HexagonInlineAsmReg>::reg_class
  66:     0x7ffb867626a5 - <rustc_middle[c25cf1c44b340179]::ty::SymbolName as core[12339feb03ad56ba]::fmt::Display>::fmt
  67:     0x7ffb86736db6 - <rustc_target[901cbfbb95c5f103]::asm::hexagon::HexagonInlineAsmReg>::reg_class
  68:     0x7ffb8672a1e6 - <rustc_target[901cbfbb95c5f103]::asm::hexagon::HexagonInlineAsmReg>::reg_class
  69:     0x7ffb86769b33 - <rustc_middle[c25cf1c44b340179]::ty::SymbolName as core[12339feb03ad56ba]::fmt::Display>::fmt
  70:     0x7ffb99baca2c - std::sys::windows::thread::Thread::new::ha768f1cd2f8f32cc
  71:     0x7ffc0f2e7034 - BaseThreadInitThunk
  72:     0x7ffc10442651 - RtlUserThreadStart

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.61.0-nightly (58f11791a 2022-03-17) running on x86_64-pc-windows-msvc

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

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

query stack during panic:
#0 [is_sized_raw] computing whether `dyn core::future::future::Future<Output = ()> + core::marker::Send` is `Sized`
#1 [layout_of] computing layout of `*const dyn core::future::future::Future<Output = ()> + core::marker::Send`
#2 [layout_of] computing layout of `core::ptr::unique::Unique<dyn core::future::future::Future<Output = ()> + core::marker::Send>`
#3 [layout_of] computing layout of `alloc::boxed::Box<dyn core::future::future::Future<Output = ()> + core::marker::Send>`
#4 [layout_of] computing layout of `core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = ()> + core::marker::Send>>`
end of query stack
Backtrace

thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', /rustc/58f11791af4f97572e7afd83f11cffe04bbbd12f\compiler\rustc_middle\src\ty\sty.rs:1089:9
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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.61.0-nightly (58f11791a 2022-03-17) running on x86_64-pc-windows-msvc

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

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

query stack during panic:
#0 [is_sized_raw] computing whether `dyn core::future::future::Future<Output = ()> + core::marker::Send` is `Sized`
#1 [layout_of] computing layout of `*const dyn core::future::future::Future<Output = ()> + core::marker::Send`
#2 [layout_of] computing layout of `core::ptr::unique::Unique<dyn core::future::future::Future<Output = ()> + core::marker::Send>`
#3 [layout_of] computing layout of `alloc::boxed::Box<dyn core::future::future::Future<Output = ()> + core::marker::Send>`
#4 [layout_of] computing layout of `core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = ()> + core::marker::Send>>`
end of query stack

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