Skip to content
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

[ICE]: Box<dyn Any> #134059

Closed
1 of 4 tasks
Millione opened this issue Dec 9, 2024 · 5 comments
Closed
1 of 4 tasks

[ICE]: Box<dyn Any> #134059

Millione opened this issue Dec 9, 2024 · 5 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ L-improper_ctypes_definitions Lint: improper_ctypes_definitions T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Millione
Copy link

Millione commented Dec 9, 2024

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

@Millione Millione added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 9, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 9, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Dec 9, 2024

Probably from #131669 cc @niacdoial

@jieyouxu jieyouxu added L-improper_ctypes_definitions Lint: improper_ctypes_definitions E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 9, 2024
@Millione
Copy link
Author

Millione commented Dec 9, 2024

Maybe the same problem as #134060

@jieyouxu
Copy link
Member

jieyouxu commented Dec 9, 2024

I can repro locally, and I get multiple ICEs locally:

One of the multiple backtraces
thread 'rustc' panicked at compiler/rustc_lint/src/types.rs:826:17:
Box<dyn Any>
stack backtrace:
   0:     0x7fb93253da9a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h2e65b410ada06bb6
   1:     0x7fb932c13e66 - core::fmt::write::hfced879cb5c426cb
   2:     0x7fb933be69d1 - std::io::Write::write_fmt::ha93774a14ff06c22
   3:     0x7fb93253d8f2 - std::sys::backtrace::BacktraceLock::print::h56a27b4c76c5a732
   4:     0x7fb93253fe0a - std::panicking::default_hook::{{closure}}::h60fb7a06be4c8b99
   5:     0x7fb93253fc53 - std::panicking::default_hook::h71be38530d3aeff2
   6:     0x7fb9316af968 - std[b9e8b20294053ab]::panicking::update_hook::<alloc[f74aba53db8a2a5b]::boxed::Box<rustc_driver_impl[299662837a2a7e44]::install_ice_hook::{closure#0}>>::{closure#0}
   7:     0x7fb932540608 - std::panicking::rust_panic_with_hook::h95ea5298a8d72379
   8:     0x7fb9316e4e81 - std[b9e8b20294053ab]::panicking::begin_panic::<rustc_errors[bbd362b0755ce9c5]::ExplicitBug>::{closure#0}
   9:     0x7fb9316da026 - std[b9e8b20294053ab]::sys::backtrace::__rust_end_short_backtrace::<std[b9e8b20294053ab]::panicking::begin_panic<rustc_errors[bbd362b0755ce9c5]::ExplicitBug>::{closure#0}, !>
  10:     0x7fb9316d9ddf - std[b9e8b20294053ab]::panicking::begin_panic::<rustc_errors[bbd362b0755ce9c5]::ExplicitBug>
  11:     0x7fb9316eee21 - <rustc_errors[bbd362b0755ce9c5]::diagnostic::BugAbort as rustc_errors[bbd362b0755ce9c5]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x7fb931cdd8a3 - rustc_middle[c0dadf335512b82]::util::bug::opt_span_bug_fmt::<rustc_span[653dcdcbb5e9e56f]::span_encoding::Span>::{closure#0}
  13:     0x7fb931cc379a - rustc_middle[c0dadf335512b82]::ty::context::tls::with_opt::<rustc_middle[c0dadf335512b82]::util::bug::opt_span_bug_fmt<rustc_span[653dcdcbb5e9e56f]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7fb931cc362b - rustc_middle[c0dadf335512b82]::ty::context::tls::with_context_opt::<rustc_middle[c0dadf335512b82]::ty::context::tls::with_opt<rustc_middle[c0dadf335512b82]::util::bug::opt_span_bug_fmt<rustc_span[653dcdcbb5e9e56f]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x7fb92fe2e640 - rustc_middle[c0dadf335512b82]::util::bug::bug_fmt
  16:     0x7fb93437a480 - rustc_lint[6c95bcccadf00356]::types::get_type_sizedness.cold
  17:     0x7fb932e737ee - <rustc_lint[6c95bcccadf00356]::types::ImproperCTypesVisitor>::check_type_for_ffi
  18:     0x7fb932e73af0 - <rustc_lint[6c95bcccadf00356]::types::ImproperCTypesVisitor>::check_type_for_ffi
  19:     0x7fb932e72b07 - <rustc_lint[6c95bcccadf00356]::types::ImproperCTypesVisitor>::check_type_for_ffi_and_report_errors
  20:     0x7fb932ec80c1 - <rustc_lint[6c95bcccadf00356]::types::ImproperCTypesDefinitions>::check_ty_maybe_containing_foreign_fnptr
  21:     0x7fb932ec5993 - rustc_hir[86a7828b14acda04]::intravisit::walk_struct_def::<rustc_lint[6c95bcccadf00356]::late::LateContextAndPass<rustc_lint[6c95bcccadf00356]::BuiltinCombinedModuleLateLintPass>>
  22:     0x7fb932ec411f - <rustc_lint[6c95bcccadf00356]::late::LateContextAndPass<rustc_lint[6c95bcccadf00356]::BuiltinCombinedModuleLateLintPass> as rustc_hir[86a7828b14acda04]::intravisit::Visitor>::visit_nested_item
  23:     0x7fb932e57a7b - rustc_hir[86a7828b14acda04]::intravisit::walk_block::<rustc_lint[6c95bcccadf00356]::late::LateContextAndPass<rustc_lint[6c95bcccadf00356]::BuiltinCombinedModuleLateLintPass>>
  24:     0x7fb932e5b6c4 - <rustc_lint[6c95bcccadf00356]::late::LateContextAndPass<rustc_lint[6c95bcccadf00356]::BuiltinCombinedModuleLateLintPass> as rustc_hir[86a7828b14acda04]::intravisit::Visitor>::visit_expr::{closure#0}
  25:     0x7fb932db2454 - <rustc_lint[6c95bcccadf00356]::late::LateContextAndPass<rustc_lint[6c95bcccadf00356]::BuiltinCombinedModuleLateLintPass> as rustc_hir[86a7828b14acda04]::intravisit::Visitor>::visit_nested_body
  26:     0x7fb932ec3f9c - <rustc_lint[6c95bcccadf00356]::late::LateContextAndPass<rustc_lint[6c95bcccadf00356]::BuiltinCombinedModuleLateLintPass> as rustc_hir[86a7828b14acda04]::intravisit::Visitor>::visit_nested_item
  27:     0x7fb932ec3337 - rustc_lint[6c95bcccadf00356]::lint_mod
  28:     0x7fb932ec30c9 - rustc_query_impl[6f59bfe60b3ab7e5]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f59bfe60b3ab7e5]::query_impl::lint_mod::dynamic_query::{closure#2}::{closure#0}, rustc_middle[c0dadf335512b82]::query::erase::Erased<[u8; 0usize]>>
  29:     0x7fb933c032c7 - rustc_query_system[c24e345390a82e0e]::query::plumbing::try_execute_query::<rustc_query_impl[6f59bfe60b3ab7e5]::DynamicConfig<rustc_query_system[c24e345390a82e0e]::query::caches::DefaultCache<rustc_span[653dcdcbb5e9e56f]::def_id::LocalModDefId, rustc_middle[c0dadf335512b82]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[6f59bfe60b3ab7e5]::plumbing::QueryCtxt, true>
  30:     0x7fb933c02e18 - rustc_query_impl[6f59bfe60b3ab7e5]::query_impl::lint_mod::get_query_incr::__rust_end_short_backtrace
  31:     0x7fb933c02902 - rustc_lint[6c95bcccadf00356]::late::check_crate::{closure#1}
  32:     0x7fb933c02478 - rustc_lint[6c95bcccadf00356]::late::check_crate
  33:     0x7fb933c05c9f - rustc_interface[4b35c70d9e3f2ffb]::passes::analysis
  34:     0x7fb933c05a2f - rustc_query_impl[6f59bfe60b3ab7e5]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6f59bfe60b3ab7e5]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[c0dadf335512b82]::query::erase::Erased<[u8; 1usize]>>
  35:     0x7fb933c0d552 - rustc_query_system[c24e345390a82e0e]::query::plumbing::try_execute_query::<rustc_query_impl[6f59bfe60b3ab7e5]::DynamicConfig<rustc_query_system[c24e345390a82e0e]::query::caches::SingleCache<rustc_middle[c0dadf335512b82]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[6f59bfe60b3ab7e5]::plumbing::QueryCtxt, true>
  36:     0x7fb933c0d037 - rustc_query_impl[6f59bfe60b3ab7e5]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  37:     0x7fb933c68b39 - rustc_interface[4b35c70d9e3f2ffb]::interface::run_compiler::<core[57c74c06c5b92a92]::result::Result<(), rustc_span[653dcdcbb5e9e56f]::ErrorGuaranteed>, rustc_driver_impl[299662837a2a7e44]::run_compiler::{closure#0}>::{closure#1}
  38:     0x7fb933b25a61 - std[b9e8b20294053ab]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[4b35c70d9e3f2ffb]::util::run_in_thread_with_globals<rustc_interface[4b35c70d9e3f2ffb]::util::run_in_thread_pool_with_globals<rustc_interface[4b35c70d9e3f2ffb]::interface::run_compiler<core[57c74c06c5b92a92]::result::Result<(), rustc_span[653dcdcbb5e9e56f]::ErrorGuaranteed>, rustc_driver_impl[299662837a2a7e44]::run_compiler::{closure#0}>::{closure#1}, core[57c74c06c5b92a92]::result::Result<(), rustc_span[653dcdcbb5e9e56f]::ErrorGuaranteed>>::{closure#0}, core[57c74c06c5b92a92]::result::Result<(), rustc_span[653dcdcbb5e9e56f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[57c74c06c5b92a92]::result::Result<(), rustc_span[653dcdcbb5e9e56f]::ErrorGuaranteed>>
  39:     0x7fb933b25708 - <<std[b9e8b20294053ab]::thread::Builder>::spawn_unchecked_<rustc_interface[4b35c70d9e3f2ffb]::util::run_in_thread_with_globals<rustc_interface[4b35c70d9e3f2ffb]::util::run_in_thread_pool_with_globals<rustc_interface[4b35c70d9e3f2ffb]::interface::run_compiler<core[57c74c06c5b92a92]::result::Result<(), rustc_span[653dcdcbb5e9e56f]::ErrorGuaranteed>, rustc_driver_impl[299662837a2a7e44]::run_compiler::{closure#0}>::{closure#1}, core[57c74c06c5b92a92]::result::Result<(), rustc_span[653dcdcbb5e9e56f]::ErrorGuaranteed>>::{closure#0}, core[57c74c06c5b92a92]::result::Result<(), rustc_span[653dcdcbb5e9e56f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[57c74c06c5b92a92]::result::Result<(), rustc_span[653dcdcbb5e9e56f]::ErrorGuaranteed>>::{closure#1} as core[57c74c06c5b92a92]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  40:     0x7fb933b24e3b - std::sys::pal::unix::thread::Thread::new::thread_start::h72b7cc34db2bc86e
  41:     0x7fb92de6bac3 - start_thread
                               at ./nptl/pthread_create.c:442:8
  42:     0x7fb92defd850 - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  43:                0x0 - <unknown>

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 `/home/joe/repos/abi_stable_crates/rustc-ice-2024-12-09T09_08_46-73759.txt` to your bug report

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

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

Notably, I can see (for example) multiple instances of

error: internal compiler error: compiler/rustc_lint/src/types.rs:826:17: we shouldn't be trying to determine if this is unsized for a reason or another: `B/#0`

@jieyouxu jieyouxu added the A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. label Dec 9, 2024
@yury
Copy link

yury commented Dec 9, 2024

More logs if it helps.

@jieyouxu
Copy link
Member

jieyouxu commented Dec 9, 2024

Ah yes, this is another case of #134060, thanks for the report. I'm going to consolidate the report into the earlier issue.

@jieyouxu jieyouxu closed this as completed Dec 9, 2024
jieyouxu added a commit to jieyouxu/rust that referenced this issue Dec 9, 2024
Revert <rust-lang#131669> due to ICE
reports:

- <rust-lang#134059> (real-world)
- <rust-lang#134060> (fuzzing)

The changes can be re-landed with those cases addressed.

This reverts commit 703bb98, reversing
changes made to f415c07.
bors added a commit to rust-lang-ci/rust that referenced this issue Dec 9, 2024
Revert rust-lang#131669 due to ICEs

Revert [lint: change help for pointers to dyn types in FFI rust-lang#131669](rust-lang#131669) due to ICE reports:

- <rust-lang#134059> (real-world)
- <rust-lang#134060> (fuzzing)

Closes rust-lang#134060.

The revert criteria I used to assess whether to post this revert was:

1. It's not trivial to fix-forward. (1) The implementation itself is tricky due to `tcx.is_sized` query not being very trivial. (2) It will need more extensive test coverage for different ty kinds.
2. It is impacting real-world crates, i.e. rust-lang#134059.
3. `improper_ctypes_definitions` is a warn-by-default lint.

This revert is without prejudice to relanding the changes. The changes can be re-landed with those cases addressed and stronger test coverage.

A rough regression test corresponding to the fuzzed example reported in rust-lang#134060 is added to check that the revert worked, it is not sufficient for the lint test coverage when the lint improvements are to be relanded. Please feel free to improve the test in the reland.

r? `@workingjubilee` (or compiler)
cc `@niacdoial` (PR author)
bors added a commit to rust-lang-ci/rust that referenced this issue Dec 9, 2024
Revert rust-lang#131669 due to ICEs

Revert [lint: change help for pointers to dyn types in FFI rust-lang#131669](rust-lang#131669) due to ICE reports:

- <rust-lang#134059> (real-world)
- <rust-lang#134060> (fuzzing)

Closes rust-lang#134060.

The revert criteria I used to assess whether to post this revert was:

1. It's not trivial to fix-forward. (1) The implementation itself is tricky due to `tcx.is_sized` query not being very trivial. (2) It will need more extensive test coverage for different ty kinds.
2. It is impacting real-world crates, i.e. rust-lang#134059.
3. `improper_ctypes_definitions` is a warn-by-default lint.

This revert is without prejudice to relanding the changes. The changes can be re-landed with those cases addressed and stronger test coverage.

A rough regression test corresponding to the fuzzed example reported in rust-lang#134060 is added to check that the revert worked, it is not sufficient for the lint test coverage when the lint improvements are to be relanded. Please feel free to improve the test in the reland.

r? `@workingjubilee` (or compiler)
cc `@niacdoial` (PR author)
bors added a commit to rust-lang-ci/rust that referenced this issue Dec 9, 2024
Revert rust-lang#131669 due to ICEs

Revert [lint: change help for pointers to dyn types in FFI rust-lang#131669](rust-lang#131669) due to ICE reports:

- <rust-lang#134059> (real-world)
- <rust-lang#134060> (fuzzing)

Closes rust-lang#134060.

The revert criteria I used to assess whether to post this revert was:

1. It's not trivial to fix-forward. (1) The implementation itself is tricky due to `tcx.is_sized` query not being very trivial. (2) It will need more extensive test coverage for different ty kinds.
2. It is impacting real-world crates, i.e. rust-lang#134059.
3. `improper_ctypes_definitions` is a warn-by-default lint.

This revert is without prejudice to relanding the changes. The changes can be re-landed with those cases addressed and stronger test coverage.

A rough regression test corresponding to the fuzzed example reported in rust-lang#134060 is added to check that the revert worked, it is not sufficient for the lint test coverage when the lint improvements are to be relanded. Please feel free to improve the test in the reland.

r? `@workingjubilee` (or compiler)
cc `@niacdoial` (PR author)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ L-improper_ctypes_definitions Lint: improper_ctypes_definitions T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants