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: thread 'rustc' panicked at 'called Option::unwrap() on a None value', compiler/rustc_metadata/src/rmeta/decoder.rs:945:54 #78922

Closed
chengniansun opened this issue Nov 10, 2020 · 6 comments
Labels
A-metadata Area: Crate metadata C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@chengniansun
Copy link

Code

fn main() {
    std::<0>
}

Meta

rustc --version --verbose:

rustc 1.49.0-nightly (25f6938da 2020-11-09)
binary: rustc
commit-hash: 25f6938da459a57b43bdf16ed6bdad3225b2a3ce
commit-date: 2020-11-09
host: x86_64-unknown-linux-gnu
release: 1.49.0-nightly

Error output

error[E0423]: expected value, found crate `std`
 --> perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:5
  |
2 |     std::<0>
  |     ^^^^^^^^ not a value

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/decoder.rs:945:54
note: run with `RUST_BACKTRACE=1` environment variable to display a 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.49.0-nightly (25f6938da 2020-11-09) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [generics_of] computing generics of `std`
#1 [opt_const_param_of] computing the optional const parameter of `main::{constant#0}`
end of query stack
error: aborting due to previous error

For more information about this error, try `rustc --explain E0423`.
Backtrace

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/decoder.rs:945:54
stack backtrace:
   0: rust_begin_unwind
             at /rustc/25f6938da459a57b43bdf16ed6bdad3225b2a3ce/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/25f6938da459a57b43bdf16ed6bdad3225b2a3ce/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/25f6938da459a57b43bdf16ed6bdad3225b2a3ce/library/core/src/panicking.rs:50:5
   3: rustc_metadata::rmeta::decoder::<impl rustc_metadata::creader::CrateMetadataRef>::get_generics
   4: rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::generics_of
   5: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::generics_of>::compute
   6: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
   7: rustc_data_structures::stack::ensure_sufficient_stack
   8: rustc_query_system::query::plumbing::get_query_impl
   9: rustc_typeck::collect::type_of::opt_const_param_of
  10: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::opt_const_param_of>::compute
  11: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  12: rustc_data_structures::stack::ensure_sufficient_stack
  13: rustc_query_system::query::plumbing::get_query_impl
  14: rustc_typeck::check::typeck
  15: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck>::compute
  16: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  17: rustc_data_structures::stack::ensure_sufficient_stack
  18: rustc_query_system::query::plumbing::get_query_impl
  19: rustc_query_system::query::plumbing::ensure_query_impl
  20: rustc_typeck::check::typeck_item_bodies
  21: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck_item_bodies>::compute
  22: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  23: rustc_data_structures::stack::ensure_sufficient_stack
  24: rustc_query_system::query::plumbing::get_query_impl
  25: rustc_typeck::check_crate
  26: rustc_interface::passes::analysis
  27: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  28: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  29: rustc_data_structures::stack::ensure_sufficient_stack
  30: rustc_query_system::query::plumbing::get_query_impl
  31: rustc_interface::passes::QueryContext::enter
  32: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  33: rustc_span::with_source_map
  34: rustc_interface::interface::create_compiler_and_run
  35: rustc_span::with_session_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

NOTE: The bug is found by our work-in-progress compiler testing tool Kira, and the test program is reduced/minimized by Perses

@chengniansun chengniansun 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 Nov 10, 2020
@jonas-schievink jonas-schievink added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Nov 10, 2020
@jyn514 jyn514 added the A-metadata Area: Crate metadata label Nov 10, 2020
@camelid camelid added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Nov 10, 2020
@camelid
Copy link
Member

camelid commented Nov 10, 2020

Assigning P-medium and removing I-prioritize as discussed in the prioritization working group.

@chengniansun
Copy link
Author

Hi @camelid

Could you comment on #78806 why it has not drawn attention from the community? Is that bug not important?

I am actively testing rustc, and would like to prioritize my efforts on important features.

Thanks.

@camelid
Copy link
Member

camelid commented Nov 10, 2020

It must not have been noticed. If you find a bug that you feel is somewhat severe, please post a comment including the phrase @rustbot prioritize which will alert us that we should prioritize it. I will mark the one you mentioned to be prioritized.

@chengniansun
Copy link
Author

Thanks for your advice. I will do that.

@camelid
Copy link
Member

camelid commented Nov 10, 2020

Also see this blog post that I wrote: https://blog.rust-lang.org/2020/10/20/regression-labels.html

@Alexendoo
Copy link
Member

Fixed by #84913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-metadata Area: Crate metadata C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority 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

6 participants