Skip to content

ICE with the newest nightly in lower_ty_direct #60518

Closed
@dovahcrow

Description

@dovahcrow

I was using nightly rust extensively for its async/await and specialization feature. After a recent update (nightly-2019-05-02), a new ICE introduced with following logs:

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21
stack backtrace:
   0:        0x110e581b3 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h6365da97c1471e71
   1:        0x110e50892 - std::sys_common::backtrace::_print::h16aa04d49feca3fd
   2:        0x110e54756 - std::panicking::default_hook::{{closure}}::h9fc4c0be5c9ca44c
   3:        0x110e544ff - std::panicking::default_hook::h9f3e4e5508e6484c
   4:        0x10fd84862 - rustc::util::common::panic_hook::h4551d4322cc0be4e
   5:        0x110e54fb0 - std::panicking::rust_panic_with_hook::h297147e5cbed8f24
   6:        0x110e549fc - std::panicking::continue_panic_fmt::h3ae1ed03b6fbf85b
   7:        0x110e548e8 - rust_begin_unwind
   8:        0x110e7bda1 - core::panicking::panic_fmt::h92ee99ae8e2af121
   9:        0x110e7bce6 - core::panicking::panic::hb56cbf1700d827ce
  10:        0x10fb86454 - rustc::hir::lowering::LoweringContext::lower_ty_direct::h9ebc55904e648f31
  11:        0x10fb701f8 - <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::h653da98ee2e15104
  12:        0x10fa9a102 - <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter::h736c20ebb9808f68
  13:        0x10fb8c4f5 - rustc::hir::lowering::LoweringContext::lower_fn_decl::h65e61c23b5e1db51
  14:        0x10fb97896 - rustc::hir::lowering::LoweringContext::lower_method_sig::hcc9e0b8d06e43390
  15:        0x10fb83948 - <rustc::hir::lowering::LoweringContext::lower_crate::ItemLowerer as syntax::visit::Visitor>::visit_impl_item::hf58ebdc514d497b2
  16:        0x10fc6b431 - syntax::visit::walk_item::h07763bacbb55de9b
  17:        0x10fb81e06 - <rustc::hir::lowering::LoweringContext::lower_crate::ItemLowerer as syntax::visit::Visitor>::visit_item::h0d167e58e23044e6
  18:        0x10fb81aab - <rustc::hir::lowering::LoweringContext::lower_crate::ItemLowerer as syntax::visit::Visitor>::visit_mod::hd9777ed3e1d08615
  19:        0x10fb80aa3 - rustc::hir::lowering::lower_crate::h0c5e238015c897e0
  20:        0x10cc0a276 - rustc::util::common::time::h348b235e44461401
  21:        0x10cb636e9 - rustc_interface::passes::BoxedResolver::access::{{closure}}::h5e3406b2f5a3ba63
  22:        0x10cbaf2a4 - rustc_interface::passes::configure_and_expand::{{closure}}::hab3456cc016f1063
  23:        0x10cb87880 - rustc_data_structures::box_region::PinnedGenerator<I,A,R>::access::h947d707adafbf1b3
  24:        0x10cbf43d2 - rustc_interface::queries::Query<T>::compute::h0c12b0325a8fa361
  25:        0x10cbf4f7e - rustc_interface::queries::Query<T>::compute::h419fdaafe2fe1061
  26:        0x10cbdffbb - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::prepare_outputs::h0b2ca183a9af9723
  27:        0x10c9b1141 - rustc_interface::interface::run_compiler_in_existing_thread_pool::h6a703186bc682b69
  28:        0x10ca29396 - std::thread::local::LocalKey<T>::with::h31807013e3f0179f
  29:        0x10c9f7ad5 - scoped_tls::ScopedKey<T>::set::h4a42df1285ef48d6
  30:        0x10ca24f42 - syntax::with_globals::h968f8ffc9c58c643
  31:        0x10c995988 - std::sys_common::backtrace::__rust_begin_short_backtrace::h209394f9599ce87a
  32:        0x110e645ee - __rust_maybe_catch_panic
  33:        0x10c9adea6 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h56573a7f40ae7fa3
  34:        0x110e3688d - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hc80e6bd391717f52
  35:        0x110e633ad - std::sys::unix::thread::Thread::new::thread_start::hfe8c382e207f42b7
  36:     0x7fff6444f304 - _pthread_body
  37:     0x7fff6445226e - _pthread_start

After a quick search it seems like this is the only unwrap in direct cause lower_ty_direct (stack frame 10).

I cannot share the code or produce a minimal case because the code base is rather big.

Minimal reproducing case

Metadata

Metadata

Assignees

Labels

A-HIRArea: The high-level intermediate representation (HIR)A-async-awaitArea: Async & AwaitA-frontendArea: Compiler frontend (errors, parsing and HIR)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