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: task 'rustc' failed at 'internal error: entered unreachable code', /home/tj/rust-lang/src/librustc/middle/check_match.rs:714 #18027

Closed
laumann opened this issue Oct 14, 2014 · 6 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@laumann
Copy link
Contributor

laumann commented Oct 14, 2014

fn main() {
    match "ab".to_string().as_bytes() {
        b"\n" => (),
        [b1, b2] => (),
        _ => ()
    }
}

Results in the following:

> RUST_BACKTRACE=1 rustc foo.rs
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'internal error: entered unreachable code', /home/tj/rust-lang/src/librustc/middle/check_match.rs:714

stack backtrace:
   1:     0x7f0d82c43240 - rt::backtrace::imp::write::h517d32de8f8710ddgDq
   2:     0x7f0d82c463d0 - failure::on_fail::h67b81ddf88f0460eDYq
   3:     0x7f0d87191190 - unwind::begin_unwind_inner::h76df22d18066ee19Gxd
   4:     0x7f0d877ddf10 - unwind::begin_unwind::h14104116603448327476
   5:     0x7f0d87a758a0 - middle::check_match::range_covered_by_constructor::h8fa219696c1aa6865Rn
   6:     0x7f0d87a73dc0 - middle::check_match::specialize::he49722c67c62a3f4KTn
   7:     0x7f0d87a72e50 - middle::check_match::is_useful_specialized::h8d2ed3b4f68da900IHn
   8:     0x7f0d87a73b40 - middle::check_match::is_useful::closure.117288
   9:     0x7f0d87a71ee0 - iter::Iterator::find::h3987249559819764121
  10:     0x7f0d87a50730 - middle::check_match::is_useful::hfd30574cebf54b25cyn
  11:     0x7f0d87a4b290 - middle::check_match::check_expr::hd4cdd89caef43d1fKWm
  12:     0x7f0d87a4d7c0 - middle::check_match::check_fn::h871a1aaa1a66c0cc88n
  13:     0x7f0d87a4e260 - visit::walk_item::h15341873477825387593
  14:     0x7f0d87a4db10 - middle::check_match::check_crate::h38e65867c6e4bcbboWm
  15:     0x7f0d877fc9e0 - util::common::time::h1991069288953859421
  16:     0x7f0d880cd880 - driver::driver::phase_3_run_analysis_passes::hf687192a195df4a9Aqx
  17:     0x7f0d880c7bc0 - driver::driver::compile_input::hcb2b12207a8e1dbdm7w
  18:     0x7f0d88153ee0 - driver::run_compiler::hf18eb26e92099043FVA
  19:     0x7f0d88153d90 - driver::run::closure.147365
  20:     0x7f0d878165a0 - task::TaskBuilder<S>::try_future::closure.101542
  21:     0x7f0d87816380 - task::TaskBuilder<S>::spawn_internal::closure.101513
  22:     0x7f0d874de0c0 - task::spawn_opts::closure.8447
  23:     0x7f0d871eca10 - rust_try_inner
  24:     0x7f0d871eca00 - rust_try
  25:     0x7f0d8718ea50 - unwind::try::hfee86de44e6a5329omd
  26:     0x7f0d8718e8d0 - task::Task::run::h4442d464d9df41ad2Bc
  27:     0x7f0d874dde00 - task::spawn_opts::closure.8387
  28:     0x7f0d871901a0 - thread::thread_start::h078eb5d6b9fd3766dWc
  29:     0x7f0d81fea0c0 - start_thread
  30:     0x7f0d86e57f89 - __clone
  31:                0x0 - <unknown>

Version:

> rustc --version=verbose
rustc 0.13.0-dev (a0ea210b3 2014-10-13 08:37:41 +0000)
binary: rustc
commit-hash: a0ea210b394aa1b61d341593a3f9098fe5bf7806
commit-date: 2014-10-13 08:37:41 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-dev
@laumann
Copy link
Contributor Author

laumann commented Oct 14, 2014

I looked for issues marked I-ICE including the word check_match.rs, but couldn't find any, so I assume this hasn't been seen before. (Although #17631 looks kinda related)

@ghost ghost self-assigned this Oct 14, 2014
@kmcallister kmcallister added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Oct 15, 2014
@steveklabnik
Copy link
Member

Still an ICE today.

@tamird
Copy link
Contributor

tamird commented Apr 21, 2015

Not a dupe of #17631 - this still ICEs. Here's a slightly reduced test case for my homies:

#![feature(slice_patterns)]
fn main() {
    match "".as_bytes() {
        b"" => (),
        [] => (),
    }
}

@Mark-Simulacrum
Copy link
Member

None of the test cases given in this issue ICE, but they don't compile either (from what I can tell this is due to changes in the slice_patterns feature). I propose this be closed, or at least the I-ICE label removed.

@arielb1 arielb1 added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ and removed I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Sep 18, 2016
@arielb1
Copy link
Contributor

arielb1 commented Sep 18, 2016

Still ICEs

#![feature(slice_patterns)]

fn main() {
    match "ab".to_string().as_bytes() {
        b"\n" => (),
        &[b1, b2] => (),
        _ => ()
    }
}

@arielb1
Copy link
Contributor

arielb1 commented Sep 18, 2016

error: internal compiler error: ../src/librustc_const_eval/check_match.rs:862: impossible case reached

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

No branches or pull requests

6 participants