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

Unexpected panic when compiling ill-formed code #22712

Closed
LukasKalbertodt opened this issue Feb 23, 2015 · 0 comments · Fixed by #22720
Closed

Unexpected panic when compiling ill-formed code #22712

LukasKalbertodt opened this issue Feb 23, 2015 · 0 comments · Fixed by #22720
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@LukasKalbertodt
Copy link
Member

When compiling ill formed code the rust compiler panics, printing: "error: internal compiler error: ident only path should have been covered already".
I saw a few issues with the same error message ( #22665 , #22426 , #22589 ) but to me they seem to be different bugs...

I tried this code:

use std::vec::Vec;

struct Foo<B> {
    buffer: B
}

fn bar() {
  let Foo<Vec<u8>>
}

I expected to see this happen: A nice compiler error message.

Instead, this happened: Internal compiler error.

Meta

rustc --version --verbose:

rustc 1.0.0-nightly (2b01a37ec 2015-02-21) (built 2015-02-22)
binary: rustc
commit-hash: 2b01a37ec38db9301239f0c0abcf3c695055b0ff
commit-date: 2015-02-21
build-date: 2015-02-22
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly

Backtrace:

$ RUST_BACKTRACE=1 rustc lib.rs 

lib.rs:8:7: 8:10 error: internal compiler error: ident only path should have been covered already
lib.rs:8   let Foo<Vec<u8>>
               ^~~
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: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:129

stack backtrace:
   1:     0x7f8ea8678210 - sys::backtrace::write::h58f3688f47ea9825KlC
   2:     0x7f8ea86a0ac0 - panicking::on_panic::h6a53d3220988f2eebYL
   3:     0x7f8ea85e1720 - rt::unwind::begin_unwind_inner::h72a0c6e103bfcdc3zCL
   4:     0x7f8ea58abde0 - rt::unwind::begin_unwind::h2955836616559227712
   5:     0x7f8ea58abd70 - diagnostic::SpanHandler::span_bug::h3f1d138a57b9309dqZE
   6:     0x7f8ea58ce780 - parse::parser::Parser<'a>::parse_pat::h809bd931d91273bfrML
   7:     0x7f8ea58e4840 - parse::parser::Parser<'a>::parse_local::h2e00e7b160166912v2L
   8:     0x7f8ea58e4a60 - parse::parser::Parser<'a>::parse_stmt::h0653bed7d257c65eq5L
   9:     0x7f8ea58ee410 - parse::parser::Parser<'a>::parse_block_tail_::h3c43c34d39ff87a5TgM
  10:     0x7f8ea58ccb70 - parse::parser::Parser<'a>::parse_inner_attrs_and_block::hebb7a527b0f1d8c5dfM
  11:     0x7f8ea58f2a50 - parse::parser::Parser<'a>::parse_item_fn::hc7a9a7383a82e7a4aWM
  12:     0x7f8ea58e76e0 - parse::parser::Parser<'a>::parse_item_::h9be2ca1f12dcd0aeuVN
  13:     0x7f8ea58f8c50 - parse::parser::Parser<'a>::parse_mod_items::hb94387fccea63b29KkN
  14:     0x7f8ea59041a0 - parse::parser::Parser<'a>::parse_crate_mod::h961b7044a0ca58e2AmO
  15:     0x7f8ea5917060 - parse::parse_crate_from_file::h8fb07d2676fac76cqOV
  16:     0x7f8ea8d025a0 - driver::phase_1_parse_input::closure.16948
  17:     0x7f8ea8cdc8d0 - driver::phase_1_parse_input::h49108518c50c4641Qra
  18:     0x7f8ea8cd92d0 - driver::compile_input::hfb1bb38c59866d0fGba
  19:     0x7f8ea8da8510 - run_compiler::hf2a7d9848e51e3b5Zbc
  20:     0x7f8ea8da6e10 - thunk::F.Invoke<A, R>::invoke::h12698859262113329290
  21:     0x7f8ea8da5d00 - rt::unwind::try::try_fn::h10854600533917764358
  22:     0x7f8ea870d880 - rust_try_inner
  23:     0x7f8ea870d870 - rust_try
  24:     0x7f8ea8da6000 - thunk::F.Invoke<A, R>::invoke::h4174228679526982116
  25:     0x7f8ea868cb60 - sys::thread::thread_start::h60ae7cb39d135ef7R4G
  26:     0x7f8ea256a0c0 - start_thread
  27:     0x7f8ea8259fd9 - __clone
  28:                0x0 - <unknown>
@jdm jdm added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Feb 23, 2015
bors added a commit that referenced this issue Feb 24, 2015
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants