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 when executing rustc --print crate-name #107822

Closed
kamulos opened this issue Feb 9, 2023 · 1 comment · Fixed by #107836
Closed

ICE when executing rustc --print crate-name #107822

kamulos opened this issue Feb 9, 2023 · 1 comment · Fixed by #107836
Assignees
Labels
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.

Comments

@kamulos
Copy link

kamulos commented Feb 9, 2023

Could not find another report for this ICE

Reproduction

rustc --print crate-name

Meta

rustc --version --verbose:

rustc 1.69.0-nightly (ef934d9b6 2023-02-08)
binary: rustc
commit-hash: ef934d9b632b8ac00276558824664c104b92b5f0
commit-date: 2023-02-08
host: x86_64-unknown-linux-gnu
release: 1.69.0-nightly
LLVM version: 15.0.7

Error output

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_driver_impl/src/lib.rs:631:44
Backtrace

stack backtrace:
   0:     0x7f8d95d6a56a - std::backtrace_rs::backtrace::libunwind::trace::h333e160faf33c040
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f8d95d6a56a - std::backtrace_rs::backtrace::trace_unsynchronized::h8be2d45828eda716
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f8d95d6a56a - std::sys_common::backtrace::_print_fmt::h5f01de6047fb3c77
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f8d95d6a56a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb1acd7d06f13fa4f
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f8d95dcaa3e - core::fmt::write::h9bd897152e7885a5
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/core/src/fmt/mod.rs:1232:17
   5:     0x7f8d95d5ac35 - std::io::Write::write_fmt::hb588c887974f395f
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/io/mod.rs:1684:15
   6:     0x7f8d95d6a335 - std::sys_common::backtrace::_print::hdf5b59b193635fac
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f8d95d6a335 - std::sys_common::backtrace::print::hdccbcddf6e41363d
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f8d95d6d0ff - std::panicking::default_hook::{{closure}}::h9c5073f0c7d1fdd8
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/panicking.rs:267:22
   9:     0x7f8d95d6ce3b - std::panicking::default_hook::h361eca61e6346e8a
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/panicking.rs:286:9
  10:     0x7f8d9908e0e4 - rustc_driver_impl[47cefa25d099f11c]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f8d95d6d93a - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h984d9854f10e9adc
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/alloc/src/boxed.rs:2002:9
  12:     0x7f8d95d6d93a - std::panicking::rust_panic_with_hook::h935b7c55015e5ced
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/panicking.rs:692:13
  13:     0x7f8d95d6d672 - std::panicking::begin_panic_handler::{{closure}}::hc7f751f9a854bc66
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/panicking.rs:577:13
  14:     0x7f8d95d6aa1c - std::sys_common::backtrace::__rust_end_short_backtrace::ha836f18d22dc9631
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7f8d95d6d3c2 - rust_begin_unwind
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/panicking.rs:575:5
  16:     0x7f8d95dc73e3 - core::panicking::panic_fmt::hb4c2ed000fc62faa
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/core/src/panicking.rs:64:14
  17:     0x7f8d95dc747d - core::panicking::panic::h077738fa3d257995
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/core/src/panicking.rs:114:5
  18:     0x7f8d9829eecb - rustc_driver_impl[47cefa25d099f11c]::print_crate_info
  19:     0x7f8d990529bd - rustc_span[819038bfe275e3b4]::with_source_map::<(), rustc_interface[1b1573b556ef570a]::interface::run_compiler<(), rustc_driver_impl[47cefa25d099f11c]::run_compiler::{closure#0}>::{closure#0}::{closure#0}>
  20:     0x7f8d99079ea5 - <scoped_tls[ea3181eec5774e32]::ScopedKey<rustc_span[819038bfe275e3b4]::SessionGlobals>>::set::<rustc_interface[1b1573b556ef570a]::interface::run_compiler<(), rustc_driver_impl[47cefa25d099f11c]::run_compiler::{closure#0}>::{closure#0}, ()>
  21:     0x7f8d9905f4f6 - std[c03f8a2ee4757336]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1b1573b556ef570a]::util::run_in_thread_pool_with_globals<rustc_interface[1b1573b556ef570a]::interface::run_compiler<(), rustc_driver_impl[47cefa25d099f11c]::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  22:     0x7f8d9907d33a - std[c03f8a2ee4757336]::panicking::try::<(), core[bc9e4d2d9829b084]::panic::unwind_safe::AssertUnwindSafe<<std[c03f8a2ee4757336]::thread::Builder>::spawn_unchecked_<rustc_interface[1b1573b556ef570a]::util::run_in_thread_pool_with_globals<rustc_interface[1b1573b556ef570a]::interface::run_compiler<(), rustc_driver_impl[47cefa25d099f11c]::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1}::{closure#0}>>
  23:     0x7f8d9905869a - <<std[c03f8a2ee4757336]::thread::Builder>::spawn_unchecked_<rustc_interface[1b1573b556ef570a]::util::run_in_thread_pool_with_globals<rustc_interface[1b1573b556ef570a]::interface::run_compiler<(), rustc_driver_impl[47cefa25d099f11c]::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[bc9e4d2d9829b084]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  24:     0x7f8d95d77933 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h09c53ab6d648609b
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/alloc/src/boxed.rs:1988:9
  25:     0x7f8d95d77933 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc5fed4f4a2772974
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/alloc/src/boxed.rs:1988:9
  26:     0x7f8d95d77933 - std::sys::unix::thread::Thread::new::thread_start::h7d90190b99e3226e
                               at /rustc/ef934d9b632b8ac00276558824664c104b92b5f0/library/std/src/sys/unix/thread.rs:108:17
  27:     0x7f8d95b07bb5 - <unknown>
  28:     0x7f8d95b89d90 - <unknown>
  29:                0x0 - <unknown>

error: 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.69.0-nightly (ef934d9b6 2023-02-08) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack

@kamulos kamulos 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 Feb 9, 2023
@chenyukang
Copy link
Member

@rustbot claim

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 10, 2023
…i-obk

Handle properly when there is no crate attrs

Fixes rust-lang#107822

r? `@oli-obk`
@bors bors closed this as completed in b940f50 Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants