Skip to content

[ICE]: Box<dyn Any> #134059

Description

@Millione

Code

https://github.com/rodrimati1992/abi_stable_crates

RUSTFLAGS="-g" cargo build --release

Affected release channels

  • Previous Stable
  • Current Stable
  • Current Beta
  • Current Nightly

Rust Version

rustc 1.85.0-nightly (4d669fb34 2024-12-08)
binary: rustc
commit-hash: 4d669fb34e7db6f3825d01e4c59b7996f0531431
commit-date: 2024-12-08
host: aarch64-apple-darwin
release: 1.85.0-nightly
LLVM version: 19.1.5

Current error output

thread 'rustc' panicked at compiler/rustc_lint/src/types.rs:826:17:
Box<dyn Any>

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/Users/roger/abi_stable_crates/rustc-ice-2024-12-09T08_30_49-37982.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C strip=debuginfo

query stack during panic:
#0 [lint_mod] linting module `for_examples`
#1 [analysis] running analysis passes on this crate
end of query stack

Backtrace

stack backtrace:
   0:        0x10e93e06c - std::backtrace::Backtrace::create::h90b3a37c4940e011
   1:        0x10cb8702c - std[bfb5b6abee616caa]::panicking::update_hook::<alloc[aa8ae451eb0c4d50]::boxed::Box<rustc_driver_impl[46652df33ae3cf4a]::install_ice_hook::{closure#0}>>::{closure#0}
   2:        0x10e958e9c - std::panicking::rust_panic_with_hook::h54f99cba33941c4e
   3:        0x10cbfdf58 - std[bfb5b6abee616caa]::panicking::begin_panic::<rustc_errors[683f32f756a2cf24]::ExplicitBug>::{closure#0}
   4:        0x10cbee00c - std[bfb5b6abee616caa]::sys::backtrace::__rust_end_short_backtrace::<std[bfb5b6abee616caa]::panicking::begin_panic<rustc_errors[683f32f756a2cf24]::ExplicitBug>::{closure#0}, !>
   5:        0x11108d704 - std[bfb5b6abee616caa]::panicking::begin_panic::<rustc_errors[683f32f756a2cf24]::ExplicitBug>
   6:        0x10cc122d0 - <rustc_errors[683f32f756a2cf24]::diagnostic::BugAbort as rustc_errors[683f32f756a2cf24]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
   7:        0x10d818e44 - rustc_middle[822ae551961f0a2a]::util::bug::opt_span_bug_fmt::<rustc_span[7205846256d90284]::span_encoding::Span>::{closure#0}
   8:        0x10d7da458 - rustc_middle[822ae551961f0a2a]::ty::context::tls::with_opt::<rustc_middle[822ae551961f0a2a]::util::bug::opt_span_bug_fmt<rustc_span[7205846256d90284]::span_encoding::Span>::{closure#0}, !>::{closure#0}
   9:        0x10d7d9870 - rustc_middle[822ae551961f0a2a]::ty::context::tls::with_context_opt::<rustc_middle[822ae551961f0a2a]::ty::context::tls::with_opt<rustc_middle[822ae551961f0a2a]::util::bug::opt_span_bug_fmt<rustc_span[7205846256d90284]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  10:        0x111100380 - rustc_middle[822ae551961f0a2a]::util::bug::bug_fmt
  11:        0x10d564428 - rustc_lint[66f12495879f0b66]::types::get_type_sizedness
  12:        0x10d565754 - <rustc_lint[66f12495879f0b66]::types::ImproperCTypesVisitor>::check_type_for_ffi
  13:        0x10d565fd4 - <rustc_lint[66f12495879f0b66]::types::ImproperCTypesVisitor>::check_type_for_ffi
  14:        0x10d566c18 - <rustc_lint[66f12495879f0b66]::types::ImproperCTypesVisitor>::check_type_for_ffi_and_report_errors
  15:        0x10d5408d0 - <rustc_lint[66f12495879f0b66]::late::LateContextAndPass<rustc_lint[66f12495879f0b66]::BuiltinCombinedModuleLateLintPass>>::with_lint_attrs::<<rustc_lint[66f12495879f0b66]::late::LateContextAndPass<rustc_lint[66f12495879f0b66]::BuiltinCombinedModuleLateLintPass> as rustc_hir[2a7c6889d61180d3]::intravisit::Visitor>::visit_field_def::{closure#0}>
  16:        0x10d479cd0 - rustc_hir[2a7c6889d61180d3]::intravisit::walk_item::<rustc_lint[66f12495879f0b66]::late::LateContextAndPass<rustc_lint[66f12495879f0b66]::BuiltinCombinedModuleLateLintPass>>
  17:        0x10d5135f8 - <rustc_lint[66f12495879f0b66]::late::LateContextAndPass<rustc_lint[66f12495879f0b66]::BuiltinCombinedModuleLateLintPass> as rustc_hir[2a7c6889d61180d3]::intravisit::Visitor>::visit_nested_item
  18:        0x10d4717ec - rustc_hir[2a7c6889d61180d3]::intravisit::walk_block::<rustc_lint[66f12495879f0b66]::late::LateContextAndPass<rustc_lint[66f12495879f0b66]::BuiltinCombinedModuleLateLintPass>>
  19:        0x10d53fed0 - <rustc_lint[66f12495879f0b66]::late::LateContextAndPass<rustc_lint[66f12495879f0b66]::BuiltinCombinedModuleLateLintPass>>::with_lint_attrs::<<rustc_lint[66f12495879f0b66]::late::LateContextAndPass<rustc_lint[66f12495879f0b66]::BuiltinCombinedModuleLateLintPass> as rustc_hir[2a7c6889d61180d3]::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0}>
  20:        0x10d47b820 - rustc_hir[2a7c6889d61180d3]::intravisit::walk_item::<rustc_lint[66f12495879f0b66]::late::LateContextAndPass<rustc_lint[66f12495879f0b66]::BuiltinCombinedModuleLateLintPass>>
  21:        0x10d540708 - <rustc_lint[66f12495879f0b66]::late::LateContextAndPass<rustc_lint[66f12495879f0b66]::BuiltinCombinedModuleLateLintPass>>::with_lint_attrs::<<rustc_lint[66f12495879f0b66]::late::LateContextAndPass<rustc_lint[66f12495879f0b66]::BuiltinCombinedModuleLateLintPass> as rustc_hir[2a7c6889d61180d3]::intravisit::Visitor>::visit_item::{closure#0}>
  22:        0x10d56e82c - rustc_lint[66f12495879f0b66]::lint_mod
  23:        0x10e128100 - rustc_query_impl[165e2a4b783ea290]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[165e2a4b783ea290]::query_impl::lint_mod::dynamic_query::{closure#2}::{closure#0}, rustc_middle[822ae551961f0a2a]::query::erase::Erased<[u8; 0usize]>>
  24:        0x10df2a644 - rustc_query_system[6657c299204f8129]::query::plumbing::try_execute_query::<rustc_query_impl[165e2a4b783ea290]::DynamicConfig<rustc_query_system[6657c299204f8129]::query::caches::DefaultCache<rustc_span[7205846256d90284]::def_id::LocalModDefId, rustc_middle[822ae551961f0a2a]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[165e2a4b783ea290]::plumbing::QueryCtxt, true>
  25:        0x10e14e714 - rustc_query_impl[165e2a4b783ea290]::query_impl::lint_mod::get_query_incr::__rust_end_short_backtrace
  26:        0x10d542a14 - rustc_lint[66f12495879f0b66]::late::check_crate::{closure#1}
  27:        0x10d541948 - rustc_lint[66f12495879f0b66]::late::check_crate
  28:        0x10d44665c - rustc_interface[69f8d7669d9c0d37]::passes::analysis
  29:        0x10e128004 - rustc_query_impl[165e2a4b783ea290]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[165e2a4b783ea290]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[822ae551961f0a2a]::query::erase::Erased<[u8; 1usize]>>
  30:        0x10def1974 - rustc_query_system[6657c299204f8129]::query::plumbing::try_execute_query::<rustc_query_impl[165e2a4b783ea290]::DynamicConfig<rustc_query_system[6657c299204f8129]::query::caches::SingleCache<rustc_middle[822ae551961f0a2a]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[165e2a4b783ea290]::plumbing::QueryCtxt, true>
  31:        0x10e1332e8 - rustc_query_impl[165e2a4b783ea290]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  32:        0x10cb382a4 - <rustc_interface[69f8d7669d9c0d37]::queries::QueryResult<&rustc_middle[822ae551961f0a2a]::ty::context::GlobalCtxt>>::enter::<core[70fe56331ca1154e]::result::Result<core[70fe56331ca1154e]::option::Option<rustc_interface[69f8d7669d9c0d37]::queries::Linker>, rustc_span[7205846256d90284]::ErrorGuaranteed>, rustc_driver_impl[46652df33ae3cf4a]::run_compiler::{closure#0}::{closure#1}::{closure#4}>
  33:        0x10cb85668 - rustc_interface[69f8d7669d9c0d37]::interface::run_compiler::<core[70fe56331ca1154e]::result::Result<(), rustc_span[7205846256d90284]::ErrorGuaranteed>, rustc_driver_impl[46652df33ae3cf4a]::run_compiler::{closure#0}>::{closure#1}
  34:        0x10cb7b0cc - std[bfb5b6abee616caa]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[69f8d7669d9c0d37]::util::run_in_thread_with_globals<rustc_interface[69f8d7669d9c0d37]::util::run_in_thread_pool_with_globals<rustc_interface[69f8d7669d9c0d37]::interface::run_compiler<core[70fe56331ca1154e]::result::Result<(), rustc_span[7205846256d90284]::ErrorGuaranteed>, rustc_driver_impl[46652df33ae3cf4a]::run_compiler::{closure#0}>::{closure#1}, core[70fe56331ca1154e]::result::Result<(), rustc_span[7205846256d90284]::ErrorGuaranteed>>::{closure#0}, core[70fe56331ca1154e]::result::Result<(), rustc_span[7205846256d90284]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[70fe56331ca1154e]::result::Result<(), rustc_span[7205846256d90284]::ErrorGuaranteed>>
  35:        0x10cb8aa2c - <<std[bfb5b6abee616caa]::thread::Builder>::spawn_unchecked_<rustc_interface[69f8d7669d9c0d37]::util::run_in_thread_with_globals<rustc_interface[69f8d7669d9c0d37]::util::run_in_thread_pool_with_globals<rustc_interface[69f8d7669d9c0d37]::interface::run_compiler<core[70fe56331ca1154e]::result::Result<(), rustc_span[7205846256d90284]::ErrorGuaranteed>, rustc_driver_impl[46652df33ae3cf4a]::run_compiler::{closure#0}>::{closure#1}, core[70fe56331ca1154e]::result::Result<(), rustc_span[7205846256d90284]::ErrorGuaranteed>>::{closure#0}, core[70fe56331ca1154e]::result::Result<(), rustc_span[7205846256d90284]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[70fe56331ca1154e]::result::Result<(), rustc_span[7205846256d90284]::ErrorGuaranteed>>::{closure#1} as core[70fe56331ca1154e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  36:        0x10e963c98 - std::sys::pal::unix::thread::Thread::new::thread_start::hf3b7c43b22d3d6e6
  37:        0x195cd826c - __pthread_deallocate

Anything else?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️L-improper_ctypes_definitionsLint: improper_ctypes_definitionsT-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