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 in type checking. #15678

Closed
Kimundi opened this issue Jul 15, 2014 · 3 comments
Closed

ICE in type checking. #15678

Kimundi opened this issue Jul 15, 2014 · 3 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@Kimundi
Copy link
Member

Kimundi commented Jul 15, 2014

Got no time right now to reduce my code to something suitable for this issue, but here's the stacktrace:

env RUST_BACKTRACE=1 rustc -Z time-passes --test lib.rs 
time: 0.021 s   parsing
time: 0.001 s   gated feature checking
time: 0.000 s   crate injection
time: 0.006 s   configuration 1
time: 0.004 s   plugin loading
time: 0.000 s   plugin registration
time: 0.153 s   expansion
time: 0.019 s   configuration 2
time: 0.041 s   maybe building test harness
time: 0.020 s   prelude injection
time: 0.024 s   assigning node ids and indexing ast
time: 0.003 s   checking that all macro invocations are gone
time: 0.007 s   external crate/lib resolution
time: 0.006 s   language item collection
time: 0.062 s   resolution
time: 0.003 s   lifetime resolution
time: 0.003 s   looking for entry point
time: 0.003 s   looking for plugin registrar
time: 0.004 s   freevar finding
time: 0.008 s   region resolution
time: 0.003 s   loop checking
time: 0.005 s   stability index
time: 0.010 s   type collecting
time: 0.006 s   variance inference
time: 0.051 s   coherence checking
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 'index out of bounds: the len is 0 but the index is 0', /build/rust-git/src/rust/src/librustc/middle/subst.rs:405

stack backtrace:
   1:     0x7fd5930924f0 - rt::backtrace::imp::write::he3c153cabf4a7f3cq3p
   2:     0x7fd593095d50 - <unknown>
   3:     0x7fd5938578a0 - unwind::begin_unwind_inner::ha5a65b58df160a4040d
   4:     0x7fd5938574f0 - unwind::begin_unwind_fmt::h70c2f259a714c416xYd
   5:     0x7fd5938574b0 - rust_begin_unwind
   6:     0x7fd593893040 - failure::begin_unwind::hbc3d32be3f0f0eadGsj
   7:     0x7fd5938968f0 - failure::fail_bounds_check::h8a8c6b47b9c92f81Sqj
   8:     0x7fd593fa7e60 - <unknown>
   9:     0x7fd593fa7e20 - <unknown>
  10:     0x7fd593fa6930 - <unknown>
  11:     0x7fd593fa6760 - <unknown>
  12:     0x7fd59410ffa0 - <unknown>
  13:     0x7fd5942507f0 - <unknown>
  14:     0x7fd59423bca0 - middle::typeck::check::check_item::h780bfe8df0600ffbKte
  15:     0x7fd594242850 - middle::typeck::check::check_item_types::ha8e05ac0096302bbRVd
  16:     0x7fd5943b4ad0 - <unknown>
  17:     0x7fd5943b37c0 - middle::typeck::check_crate::h402e13d36885c984UhE
  18:     0x7fd594780d90 - driver::driver::phase_3_run_analysis_passes::hb27e21c9fdbdedb5pIs
  19:     0x7fd59477c630 - driver::driver::compile_input::hf7d515d8bec94a4equs
  20:     0x7fd594833670 - <unknown>
  21:     0x7fd594833580 - <unknown>
  22:     0x7fd5948473d0 - <unknown>
  23:     0x7fd594847160 - <unknown>
  24:     0x7fd59688f510 - <unknown>
  25:     0x7fd5938a7040 - rust_try
  26:     0x7fd593854930 - unwind::try::h63746c58630b0ca2tPd
  27:     0x7fd593854690 - task::Task::run::h93b61e983904f1c5P0c
  28:     0x7fd59688f300 - <unknown>
  29:     0x7fd593856910 - <unknown>
  30:     0x7fd592b12060 - start_thread
  31:     0x7fd59351f489 - __clone
  32:                0x0 - <unknown>

@huonw huonw changed the title ICE in coherence checking. ICE in type checking. Jul 15, 2014
@huonw
Copy link
Member

huonw commented Jul 15, 2014

(This is actually an ICE in the phase after coherence checking (i.e. type checking), since the timing is printed after each phase finishes; I have updated the title.)

@huonw huonw added the I-ICE label Jul 15, 2014
@pczarn
Copy link
Contributor

pczarn commented Jul 27, 2014

An example that gives the same exact "the len is 0 but the index is 0".

#![feature(overloaded_calls)]
use std::ops::{Fn, Add};
struct g;
impl<'a,A:Add<int,int>> Fn<(A,),int> for g {
    #[rust_call_abi_hack]
    fn call(&self, (arg,): (A,)) -> int {
        arg.add(&1)
    }
}
g(1i)

Edit: Unrelated. It has its own issue.

@ghost
Copy link

ghost commented Oct 28, 2014

As we're missing the code to reproduce this issue, it's not really actionable, so I'm going to close it.

@ghost ghost closed this as completed Oct 28, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 13, 2023
…diagnostics, r=HKalbasi

fix: add incorrect case diagnostics for module names

Adds diagnostics for checking both inline and file module names are snake case.

Closes rust-lang#15678
This issue was closed.
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

3 participants