Skip to content

unexpected panic #47805

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
d653 opened this issue Jan 27, 2018 · 0 comments
Closed

unexpected panic #47805

d653 opened this issue Jan 27, 2018 · 0 comments
Assignees
Labels
A-coroutines Area: Coroutines A-NLL Area: Non-lexical lifetimes (NLL) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@d653
Copy link

d653 commented Jan 27, 2018

Source:

#![feature(proc_macro, conservative_impl_trait, generators,nll)]
extern crate futures_await as futures;
use futures::prelude::*;


fn main() {

}

struct Test;

#[async]
fn test(x : Test) -> Result<(),()> {
    Ok(())
}


#[async]
fn test2(x:Test) -> Result<(),()> {
    let _ = await!(test(x));
    let _ = await!(test(x));
    Ok(())
}

Cargo.toml:

[package]
name = "rustcrash2"
version = "0.1.0"
authors = ["me"]

[dependencies]
futures-await = "0.1"

Result:

$ RUST_BACKTRACE=full cargo build --verbose
       Fresh futures v0.1.18
       Fresh futures-await-await-macro v0.1.0
       Fresh unicode-xid v0.1.0
       Fresh proc-macro2 v0.1.10
       Fresh futures-await-quote v0.4.0
       Fresh futures-await-synom v0.12.0
       Fresh futures-await-syn v0.12.0
       Fresh futures-await-async-macro v0.1.1
       Fresh futures-await v0.1.0
   Compiling rustcrash2 v0.1.0 (file:///home/me/sources/rustcrash2)
     Running `rustc --crate-name rustcrash2 src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=7e79b8d3706d0c0e -C extra-filename=-7e79b8d3706d0c0e --out-dir /home/me/sources/rustcrash2/target/debug/deps -C incremental=/home/me/sources/rustcrash2/target/debug/incremental -L dependency=/home/me/sources/rustcrash2/target/debug/deps --extern futures_await=/home/me/sources/rustcrash2/target/debug/deps/libfutures_await-cf8240b5fc65c835.rlib`
warning: unused variable: `x`
  --> src/main.rs:13:9
   |
13 | fn test(x : Test) -> Result<(),()> {
   |         ^
   |
   = note: #[warn(unused_variables)] on by default
   = note: to avoid this warning, consider using `_x` instead

error: internal compiler error: librustc_mir/borrow_check/error_reporting.rs:762: End-user description not implemented for field access on `TyGenerator(DefId(0/1:13 ~ rustcrash2[93e0]::test2[0]::{{closure}}[0]), ClosureSubsts { substs: Slice([futures::Async<futures::__rt::Mu>, std::result::Result<(), ()>, Test]) }, GeneratorInterior { witness: {impl futures::__rt::MyFuture<std::result::Result<(), ()>>, futures::Async<futures::__rt::Mu>, (), std::result::Result<(), ()>}, movable: true })`

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.25.0-nightly (a0dcecff9 2018-01-24) running on x86_64-unknown-linux-gnu

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:509:9
stack backtrace:
   0:     0x7f0c84e3d67b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h2a82cd9b077adad0
                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7f0c84e508f4 - std::sys_common::backtrace::print::h35ab70395184fd6e
                               at libstd/sys_common/backtrace.rs:68
                               at libstd/sys_common/backtrace.rs:57
   2:     0x7f0c84e2a0a0 - std::panicking::default_hook::{{closure}}::h133a20fbe256e9d0
                               at libstd/panicking.rs:380
   3:     0x7f0c84e29b6a - std::panicking::default_hook::h26f73b4578df89ad
                               at libstd/panicking.rs:390
   4:     0x7f0c84e2a5ab - std::panicking::rust_panic_with_hook::hf57733b54319e2cd
                               at libstd/panicking.rs:576
   5:     0x7f0c7f89eca7 - std::panicking::begin_panic::h3bf24d542c5fbe73
   6:     0x7f0c7f8b9e01 - rustc_errors::Handler::bug::hbdd95e2dff36c759
   7:     0x7f0c80b88d9f - <std::thread::local::LocalKey<T>>::with::hccebb4a12350e6a6
   8:     0x7f0c810886ce - rustc::ty::context::tls::with_opt::hb53e15348f960800
   9:     0x7f0c80c0ead7 - rustc::session::opt_span_bug_fmt::ha06f5f0a7822d157
  10:     0x7f0c80c0e9e6 - rustc::session::bug_fmt::h91675ae9f2b7e5fe
  11:     0x7f0c81b7225e - rustc_mir::borrow_check::error_reporting::<impl rustc_mir::borrow_check::MirBorrowckCtxt<'cx, 'gcx, 'tcx>>::describe_field_from_ty::h1a22a58bca8678f3
  12:     0x7f0c81b71dd2 - rustc_mir::borrow_check::error_reporting::<impl rustc_mir::borrow_check::MirBorrowckCtxt<'cx, 'gcx, 'tcx>>::describe_field::h886c130062d4d8c8
  13:     0x7f0c81b717d2 - rustc_mir::borrow_check::error_reporting::<impl rustc_mir::borrow_check::MirBorrowckCtxt<'cx, 'gcx, 'tcx>>::append_place_to_string::hef40787ef9ff0132
  14:     0x7f0c81b6f236 - rustc_mir::borrow_check::error_reporting::<impl rustc_mir::borrow_check::MirBorrowckCtxt<'cx, 'gcx, 'tcx>>::report_use_of_moved_or_uninitialized::h5c8481e406b201cc
  15:     0x7f0c81b7a6c9 - rustc_mir::borrow_check::MirBorrowckCtxt::check_if_path_is_moved::hff0642791426604e
  16:     0x7f0c81b7a0cf - rustc_mir::borrow_check::MirBorrowckCtxt::consume_operand::h316df1325054beb5
  17:     0x7f0c81b7751f - <rustc_mir::borrow_check::MirBorrowckCtxt<'cx, 'gcx, 'tcx> as rustc_mir::dataflow::DataflowResultsConsumer<'cx, 'tcx>>::visit_statement_entry::h329988399e5f3a15
  18:     0x7f0c81b769fd - rustc_mir::borrow_check::do_mir_borrowck::hb7cf8487e8339171
  19:     0x7f0c81b9d81a - rustc::ty::context::tls::enter::h354f5fd07bb0530a
  20:     0x7f0c81c3a4ed - rustc::infer::InferCtxtBuilder::enter::h2e69f006a0cb586e
  21:     0x7f0c81b75ab7 - rustc_mir::borrow_check::mir_borrowck::h45325ab759cca24e
  22:     0x7f0c80e0e98e - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_borrowck<'tcx>>::compute_result::h547839b21814e4b0
  23:     0x7f0c80ed7072 - rustc::dep_graph::graph::DepGraph::with_task_impl::h5769fe275ea111a9
  24:     0x7f0c80b4aea9 - rustc_errors::Handler::track_diagnostics::h2253bfc9405d74eb
  25:     0x7f0c809fdb80 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h74caf1343a15497e
  26:     0x7f0c80e0ea2f - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_borrowck<'tcx>>::force::h82dda2cafb42c807
  27:     0x7f0c80e0f1b5 - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_borrowck<'tcx>>::try_get::haf6c8f6a1bca825d
  28:     0x7f0c80f8ac9e - rustc::ty::maps::TyCtxtAt::mir_borrowck::h504373acc2092d89
  29:     0x7f0c80a3bb38 - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_borrowck::h84edb4666da4dee6
  30:     0x7f0c81b8e742 - rustc_mir::transform::optimized_mir::hf7f67d48604a923e
  31:     0x7f0c80dfff68 - rustc::ty::maps::<impl rustc::ty::maps::queries::optimized_mir<'tcx>>::compute_result::hf54a755b44fc55d1
  32:     0x7f0c80edfaab - rustc::dep_graph::graph::DepGraph::with_task_impl::h7c236a95b885a8c5
  33:     0x7f0c80b72562 - rustc_errors::Handler::track_diagnostics::hf181ff56d7d6278d
  34:     0x7f0c809d80d0 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h0129f38a7438caa6
  35:     0x7f0c80dffffe - rustc::ty::maps::<impl rustc::ty::maps::queries::optimized_mir<'tcx>>::force::he4dccf139916ed8e
  36:     0x7f0c80e006b2 - rustc::ty::maps::<impl rustc::ty::maps::queries::optimized_mir<'tcx>>::try_get::h076f5444f548b78b
  37:     0x7f0c80f8a2da - rustc::ty::maps::TyCtxtAt::optimized_mir::h58af796b6547bc27
  38:     0x7f0c80f7db58 - rustc::ty::sty::ClosureSubsts::field_tys::ha4cb88bd11007f44
  39:     0x7f0c81ca230e - rustc_mir::borrow_check::nll::type_check::TypeChecker::typeck_mir::hcf19d61861930049
  40:     0x7f0c81c98818 - rustc_mir::borrow_check::nll::type_check::type_check_internal::hf565c97c0e92bc65
  41:     0x7f0c81b9f077 - rustc::ty::context::tls::enter::h7c8f34016ab922f8
  42:     0x7f0c81c3a73b - rustc::infer::InferCtxtBuilder::enter::h9a9999837ffbae0c
  43:     0x7f0c81ca5039 - <rustc_mir::borrow_check::nll::type_check::TypeckMir as rustc_mir::transform::MirPass>::run_pass::h4b207a012881d204
  44:     0x7f0c81b90f4e - rustc_mir::transform::mir_const::{{closure}}::h37e2bdcbe097dffd
  45:     0x7f0c81b8e3ea - rustc_mir::transform::mir_const::hcb40821e84baa8f5
  46:     0x7f0c80dfd7e8 - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_const<'tcx>>::compute_result::ha0811fd13480c973
  47:     0x7f0c80ed315b - rustc::dep_graph::graph::DepGraph::with_task_impl::h43633f09208dbcde
  48:     0x7f0c80b5e092 - rustc_errors::Handler::track_diagnostics::h90d0a562996bb44d
  49:     0x7f0c80a02860 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h8247a275a4b016c5
  50:     0x7f0c80dfd87e - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_const<'tcx>>::force::h755b9b907d6fe287
  51:     0x7f0c80dfdf33 - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_const<'tcx>>::try_get::h97b4d51e5c59ebc4
  52:     0x7f0c80f8a11a - rustc::ty::maps::TyCtxtAt::mir_const::h3fa764ab76acf2e5
  53:     0x7f0c80a3b890 - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_const::he17f70c7d374b170
  54:     0x7f0c81b8e5c5 - rustc_mir::transform::mir_validated::h5e17a7c70a2d370b
  55:     0x7f0c80dfeba8 - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_validated<'tcx>>::compute_result::h157bfc12527cd31d
  56:     0x7f0c80ed315b - rustc::dep_graph::graph::DepGraph::with_task_impl::h43633f09208dbcde
  57:     0x7f0c80b5de32 - rustc_errors::Handler::track_diagnostics::h8fa800154527f2f1
  58:     0x7f0c80a24830 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::hf74dcabd40717bff
  59:     0x7f0c80dfec3e - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_validated<'tcx>>::force::h49c800113caa0a28
  60:     0x7f0c80dff2f3 - rustc::ty::maps::<impl rustc::ty::maps::queries::mir_validated<'tcx>>::try_get::hfd7e5bfb35e21550
  61:     0x7f0c80f8a1fa - rustc::ty::maps::TyCtxtAt::mir_validated::h54342f8ad29e11d0
  62:     0x7f0c80a3b8c0 - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_validated::ha8f1879108fe67b0
  63:     0x7f0c82001869 - rustc_borrowck::borrowck::borrowck::hd8d678ae0d98b3f8
  64:     0x7f0c80ef51ee - rustc::dep_graph::graph::DepGraph::with_task_impl::hda42a605fcb8a7ff
  65:     0x7f0c80b51c32 - rustc_errors::Handler::track_diagnostics::h4dbf31240245c45a
  66:     0x7f0c80a25ef0 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::hf9c1517179310159
  67:     0x7f0c80e0d32f - rustc::ty::maps::<impl rustc::ty::maps::queries::borrowck<'tcx>>::force::h4bd5a83caee1429d
  68:     0x7f0c80e0d9d8 - rustc::ty::maps::<impl rustc::ty::maps::queries::borrowck<'tcx>>::try_get::h83f364093b34143c
  69:     0x7f0c80f8ab8c - rustc::ty::maps::TyCtxtAt::borrowck::h07240f1589208595
  70:     0x7f0c80a3bb00 - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::borrowck::h386a25fb46489a06
  71:     0x7f0c82001611 - rustc_borrowck::borrowck::check_crate::he33ea061c362a016
  72:     0x7f0c85264444 - <std::thread::local::LocalKey<T>>::with::hba9d44b361a99b73
  73:     0x7f0c85264d53 - <std::thread::local::LocalKey<T>>::with::hc486dc3e1cbb7734
  74:     0x7f0c85295ec5 - rustc_driver::driver::compile_input::hd0e8996e608fe229
  75:     0x7f0c852a71f7 - rustc_driver::run_compiler::h12a90ff286966bc0
  76:     0x7f0c85207531 - std::sys_common::backtrace::__rust_begin_short_backtrace::hda0ecbd3097611f8
  77:     0x7f0c84e7694e - __rust_maybe_catch_panic
                               at libpanic_unwind/lib.rs:102
  78:     0x7f0c851b8672 - <F as alloc::boxed::FnBox<A>>::call_box::h6618333a9821d7ad
  79:     0x7f0c84e5499b - std::sys::unix::thread::Thread::new::thread_start::hb81bb73cc541f841
                               at /checkout/src/liballoc/boxed.rs:798
                               at libstd/sys_common/thread.rs:24
                               at libstd/sys/unix/thread.rs:90
  80:     0x7f0c7ede961a - start_thread
  81:     0x7f0c84b1598e - __GI___clone
  82:                0x0 - <unknown>

error: Could not compile `rustcrash2`.

Caused by:
  process didn't exit successfully: `rustc --crate-name rustcrash2 src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=7e79b8d3706d0c0e -C extra-filename=-7e79b8d3706d0c0e --out-dir /home/me/sources/rustcrash2/target/debug/deps -C incremental=/home/me/sources/rustcrash2/target/debug/incremental -L dependency=/home/me/sources/rustcrash2/target/debug/deps --extern futures_await=/home/me/sources/rustcrash2/target/debug/deps/libfutures_await-cf8240b5fc65c835.rlib` (exit code: 101)

@kennytm kennytm added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-NLL Area: Non-lexical lifetimes (NLL) C-bug Category: This is a bug. A-coroutines Area: Coroutines labels Jan 27, 2018
@sapphire-arches sapphire-arches self-assigned this Jan 29, 2018
@Zoxc Zoxc closed this as completed Feb 3, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-coroutines Area: Coroutines A-NLL Area: Non-lexical lifetimes (NLL) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants