Skip to content

rustc panic: libsyntax/lib.rs: index out of bounds: the len is 61 but the index is 247 #20913

Closed
@ajf

Description

@ajf
$ RUST_BACKTRACE=1 cargo test
   Compiling regex v0.1.10
   Compiling regex_macros v0.1.5
   Compiling plotter v0.0.1 (file:///Users/andrew/git/libplotter-rust)
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. 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
thread 'rustc' panicked at 'index out of bounds: the len is 61 but the index is 247', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libsyntax/lib.rs:1

stack backtrace:
   1:        0x10b2524b5 - sys::backtrace::write::h64ca2fb259c4ae97lCt
   2:        0x10b27494f - failure::on_fail::h64ff5ae6887860cc0Hz
   3:        0x10b1e05ca - rt::unwind::begin_unwind_inner::h1d4bc098fd350446Qpz
   4:        0x10b1e07c4 - rt::unwind::begin_unwind_fmt::h2787666abdf9afbbnoz
   5:        0x10b2743be - rust_begin_unwind
   6:        0x10b2bf627 - panicking::panic_fmt::h147727a519895962pfl
   7:        0x10b2c8db1 - panicking::panic_bounds_check::h7f4dce76ef1e56a3qel
   8:        0x11b67d488 - util::interner::StrInterner::get::ha9c64a5684118022cqa
   9:        0x11b68a9c8 - ast::Name::as_str::h59668c74008d81d5CQb
  10:        0x11b7407ed - parse::parser::Parser<'a>::lit_from_token::hbf5030500dd119fatOK
  11:        0x11b744c03 - parse::parser::Parser<'a>::parse_lit::hdcc025c3b7cd024axSK
  12:        0x11b74971e - parse::parser::Parser<'a>::parse_bottom_expr::ha2664df4b03a3ed6BbL
  13:        0x11b74cab3 - parse::parser::Parser<'a>::parse_dot_or_call_expr::hbe0d8d40c61ea79fytL
  14:        0x11b74fdb6 - parse::parser::Parser<'a>::parse_prefix_expr::haea27a000f1d4221gQL
  15:        0x11b750193 - parse::parser::Parser<'a>::parse_binops::ha6c755070e3c6b58BWL
  16:        0x11b7507c3 - parse::parser::Parser<'a>::parse_assign_expr::h7da939d5e0adb6f1a1L
  17:        0x11b67f802 - parse::parser::Parser<'a>::parse_expr::h98ff7e711bf6dbacUeM
  18:        0x1169967ca - parse::h4a7f28cd74a858a1STe
  19:        0x1169960ff - native::hf56668b93453df4c3aa
  20:        0x11b06c440 - ext::base::F.TTMacroExpander::expand::h9755274305956037081
  21:        0x10906a625 - ext::expand::expand_expr::unboxed_closure.55815
  22:        0x109069b72 - ext::expand::expand_expr::h4823b5576ddbb90asSd
  23:        0x10901d5d7 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_expr::h0d386cd2b9a9fb6aGVe
  24:        0x109072f21 - fold::noop_fold_expr::unboxed_closure.55879
  25:        0x10908851c - ext::expand::expand_non_macro_stmt::unboxed_closure.56104
  26:        0x109087a5d - ext::expand::expand_non_macro_stmt::unboxed_closure.56102
  27:        0x109086331 - ext::expand::expand_stmt::h5c75f021c3ff26faOue
  28:        0x1090877f7 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_stmt::h56018a99a3d29580yXe
  29:        0x1090aee4f - ext::expand::expand_block_elts::unboxed_closure.56405
  30:        0x1090aed69 - option::Option<T>::map::h6631393528970113854
  31:        0x1090aea7b - vec::Vec<T>.FromIterator<T>::from_iter::h1786273657078117735
  32:        0x1090ade9c - ptr::P<T>::map::h4968813950356056212
  33:        0x1090adbcb - ext::expand::expand_block::h04844853f5b48176IEe
  34:        0x109073661 - ext::expand::expand_and_rename_fn_decl_and_block::hf593166bbd7e4fa7tTe
  35:        0x1090d0d19 - ptr::P<T>::and_then::h2557855331020783439
  36:        0x109082491 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_method::hd8b42f33e6bc3181CYe
  37:        0x10907ab6a - ext::expand::expand_item_underscore::h95d78afeac10acfcAje
  38:        0x1090784de - fold::noop_fold_item_simple::h6478299046903735577
  39:        0x1090781ad - ptr::P<T>::map::h5396002592945969675
  40:        0x10907489c - ext::expand::expand_item::hbf1a39c4ad6c0eea4be
  41:        0x10907f212 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_item::h22ac4da365d6867akWe
  42:        0x10907ef70 - fold::noop_fold_mod::unboxed_closure.55994
  43:        0x10907ef09 - option::Option<T>::map::h12796966290915212443
  44:        0x10907ec1b - vec::Vec<T>.FromIterator<T>::from_iter::h13783601339641917247
  45:        0x10907dbbc - fold::noop_fold_mod::h624287961893558278
  46:        0x109079cf2 - ext::expand::expand_item_underscore::h95d78afeac10acfcAje
  47:        0x1090784de - fold::noop_fold_item_simple::h6478299046903735577
  48:        0x1090781ad - ptr::P<T>::map::h5396002592945969675
  49:        0x109074b99 - ext::expand::expand_item::hbf1a39c4ad6c0eea4be
  50:        0x10907f212 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_item::h22ac4da365d6867akWe
  51:        0x10907ef70 - fold::noop_fold_mod::unboxed_closure.55994
  52:        0x10907ef09 - option::Option<T>::map::h12796966290915212443
  53:        0x10907ec1b - vec::Vec<T>.FromIterator<T>::from_iter::h13783601339641917247
  54:        0x10907dbbc - fold::noop_fold_mod::h624287961893558278
  55:        0x109079cf2 - ext::expand::expand_item_underscore::h95d78afeac10acfcAje
  56:        0x1090784de - fold::noop_fold_item_simple::h6478299046903735577
  57:        0x1090781ad - ptr::P<T>::map::h5396002592945969675
  58:        0x109074b99 - ext::expand::expand_item::hbf1a39c4ad6c0eea4be
  59:        0x10907f212 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_item::h22ac4da365d6867akWe
  60:        0x1090d482b - ext::expand::expand_crate::hb7274d563b739079B0e
  61:        0x107aa56af - driver::phase_2_configure_and_expand::unboxed_closure.18501
  62:        0x107a63eeb - driver::phase_2_configure_and_expand::h1a066e68344edf12Xja
  63:        0x107a553e7 - driver::compile_input::h31580cbd7ea87613xba
  64:        0x107b21fda - monitor::unboxed_closure.22557
  65:        0x107b20735 - thunk::F.Invoke<A, R>::invoke::h6367419564961841226
  66:        0x107b1f510 - rt::unwind::try::try_fn::h7763956589852599824
  67:        0x10b2db2a9 - rust_try_inner
  68:        0x10b2db296 - rust_try
  69:        0x107b1fc0c - thunk::F.Invoke<A, R>::invoke::h16724184168577887652
  70:        0x10b262154 - sys::thread::thread_start::hbd8f2f8bdd3a3baadrw
  71:     0x7fff8f4ad268 - _pthread_body
  72:     0x7fff8f4ad1e5 - _pthread_body

Build failed, waiting for other jobs to finish...

Versions:

$ rustc --version
rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)
$ cargo --version
cargo 0.0.1-pre-nightly (8c01b6b 2015-01-08 20:52:43 +0000)

Minimal code (error is index out of bounds: the len is 61 but the index is 66):

#[plugin]
extern crate regex_macros;
extern crate regex;

static R : regex::Regex = regex!(r".+");

fn main() {
    println!("Hello, world!");
}

Cargo.toml:

[dependencies]
regex = "0.1.10"
regex_macros = "0.1.5"
log = "0.1.9"

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