Skip to content

ICE in subst.rs (task 'rustc' failed at 'index out of bounds: the len is 1 but the index is 1', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/librustc/middle/subst.rs:420 #15905

Closed
@pythonesque

Description

@pythonesque

Edited with a (reasonably) minimal testcase below. Reproducible with rustc 0.12.0-pre-nightly (f15d6d2 2014-07-20 22:46:29 +0000) on ArchLinux on a Macbook Pro on https://github.com/pythonesque/mud.rs/blob/cee7a78e449a507f3faacf4de16232fed7df5d29/src/main.rs

#![feature(unsafe_destructor)]

fn main() {
    trait Trait<T> {}
    struct Struct<S>(S);

    #[unsafe_destructor]
    impl<S, T: Trait<S>> Drop for Struct<T> {
        fn drop(&mut self) {}
    }
    Struct(());
}

% RUST_BACKTRACE=1 cargo build          
   Compiling mud v0.1.0 (file:/home/$HOME/dev/personal/mud.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 'index out of bounds: the len is 1 but the index is 1', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/librustc/middle/subst.rs:420

stack backtrace:
   1:     0x7fc6f7010d80 - rt::backtrace::imp::write::h86f9dc98984aaec9A7p
   2:     0x7fc6f7014220 - failure::on_fail::h03e0e71824a692d7Psq
   3:     0x7fc6fb06b5d0 - unwind::begin_unwind_inner::h9ad6a00aad1794b670d
   4:     0x7fc6fb06b230 - unwind::begin_unwind_fmt::ha76f7ed4dc0c1e80AYd
   5:     0x7fc6fb06b1f0 - rust_begin_unwind
   6:     0x7fc6fb0aecf0 - failure::begin_unwind::hb5438e30e14a068bKsj
   7:     0x7fc6fb0b25a0 - failure::fail_bounds_check::hc18c7c2fe9e6f28aWqj
   8:     0x7fc6fbc49ad0 - middle::typeck::check::vtable::lookup_vtables::h23a9c732dd2dfb40HZI
   9:     0x7fc6fbb58ae0 - middle::typeck::check::vtable::trans_resolve_method::h924e60b00e7cb248zFK
  10:     0x7fc6fbac4d40 - middle::trans::base::get_res_dtor::h148cab4191686935MYa
  11:     0x7fc6fbac4650 - middle::trans::glue::trans_struct_drop::h6344c728b401d014seY
  12:     0x7fc6fbac45e0 - middle::trans::glue::trans_struct_drop_flag::closure.$x22closure$x22$LP$115800$RP$
  13:     0x7fc6fbac4290 - middle::trans::base::with_cond::hf7e5084ee7d2350c9Rb
  14:     0x7fc6fbabe570 - middle::trans::glue::make_drop_glue::as_closure.$x22as_closure$x22$LP$115766$RP$
  15:     0x7fc6fbabda10 - middle::trans::glue::make_generic_glue::he9f27f4c0d1a742eIHY
  16:     0x7fc6fbab9aa0 - middle::trans::glue::get_drop_glue::h54121c91b866dd1dL4X
  17:     0x7fc6fbab9930 - middle::trans::glue::drop_ty::h21df00a92156d02dr2X
  18:     0x7fc6fbbec520 - middle::trans::cleanup::DropValue.Cleanup::trans::h2dd9d2d61ef253daEJv
  19:     0x7fc6fbaae220 - middle::trans::cleanup::FunctionContext<'a>.CleanupMethods<'a>::pop_and_trans_ast_cleanup_scope::h8ca861c1072d0b147ou
  20:     0x7fc6fbaad280 - middle::trans::controlflow::trans_stmt::h378fa113b41a1fa4jqX
  21:     0x7fc6fbaaee80 - middle::trans::controlflow::trans_block::h10c5d442d00e4096zvX
  22:     0x7fc6fbb62290 - middle::trans::base::trans_closure::h7e6f5cbf01f38b24Fwc
  23:     0x7fc6fbaa2310 - middle::trans::base::trans_fn::hac67266cb4b6c569lJc
  24:     0x7fc6fba9d2d0 - middle::trans::base::trans_item::h1d4f0e354901b9f6H1c
  25:     0x7fc6fbb72200 - middle::trans::base::trans_crate::h59305eb6a53411cbAUd
  26:     0x7fc6fbf934d0 - driver::driver::phase_4_translate_to_llvm::h163f2ef73368e89dbxw
  27:     0x7fc6fbf8a1d0 - driver::driver::compile_input::h2714688c818fc93cD9v
  28:     0x7fc6fc035640 - driver::run_compiler::hdc3f7737fe0af6fbDiz
  29:     0x7fc6fc035550 - driver::main_args::closure.$x22closure$x22$LP$138065$RP$
  30:     0x7fc6fc048bf0 - task::TaskBuilder<S>::try_future::closure.$x22closure$x22$LP$139209$RP$
  31:     0x7fc6fc0489b0 - task::TaskBuilder<S>::spawn_internal::closure.$x22closure$x22$LP$139186$RP$
  32:     0x7fc6fb3cc210 - task::spawn_opts::closure.$x22closure$x22$LP$8165$RP$
  33:     0x7fc6fb0c2ab0 - rust_try
  34:     0x7fc6fb068680 - unwind::try::h0fa4943ea00a482ewPd
  35:     0x7fc6fb0683e0 - task::Task::run::hf8555f915ed22c94S0c
  36:     0x7fc6fb3cc000 - task::spawn_opts::closure.$x22closure$x22$LP$8111$RP$
  37:     0x7fc6fb06a660 - thread::thread_start::he6fee52c0ee35cbcqnd
  38:     0x7fc6f6378060 - start_thread
  39:     0x7fc6fad33489 - __clone
  40:                0x0 - <unknown>

Could not execute process rustc /home/$HOME/dev/personal/mud.rs/src/main.rs --crate-name mud --crate-type bin --out-dir /home/$HOME/dev/personal/mud.rs/target -L /home/$HOME/dev/personal/mud.rs/target -L /home/$HOME/dev/personal/mud.rs/target/deps (status=101)

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions