Skip to content

ICE: index out of bounds #32320

Closed
Closed

Description

@strega-nil
   Compiling pinkc v0.1.0 (file:///Users/ubsan/src/workspace/rust/pink)
error: internal compiler error: unexpected panic
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
thread 'rustc' panicked at 'index out of bounds: the len is 15 but the index is 17', ../src/libcollections/vec.rs:1179
stack backtrace:
   1:        0x10c8de518 - sys::backtrace::tracing::imp::write::hd929d4e27d7189acGvv
   2:        0x10c8e7979 - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.44460
   3:        0x10c8e7497 - panicking::default_handler::h323e24f308b387b4U6z
   4:        0x10c8ac576 - sys_common::unwind::begin_unwind_inner::h3bfd460d0d96a1d2suu
   5:        0x10c8ad06e - sys_common::unwind::begin_unwind_fmt::he7cb7c739b04da34ytu
   6:        0x10c8dbdd7 - rust_begin_unwind
   7:        0x10c920c20 - panicking::panic_fmt::h8917bddd72ecec2e7mM
   8:        0x10c920e30 - panicking::panic_bounds_check::h93a3522a76b40c57dmM
   9:        0x10931b9e0 - middle::infer::InferCtxt<'a, 'tcx>::shallow_resolve::hd3812351ab4bfbe02jE
  10:        0x1093f59eb - middle::traits::fulfill::process_predicate::h825292a03af2b183FnU
  11:        0x1093f47d3 - obligation_forest::ObligationForest<O, T>::process_obligations::h12431531188540138369
  12:        0x1093efebc - middle::traits::fulfill::FulfillmentContext<'tcx>::select_where_possible::hdd4f708f72da3cd5KfU
  13:        0x1086a6694 - check::FnCtxt<'a, 'tcx>::select_obligations_where_possible::hb66eedf8825bdea3VIq
  14:        0x1086ba14c - check::FnCtxt<'a, 'tcx>::resolve_type_vars_if_possible::h71a8db5364f9d703jPp
  15:        0x1086d052a - check::demand::coerce::h246de84530e7134eWCf
  16:        0x1086cdf30 - check::check_argument_types::h1700393ff797f022T8q
  17:        0x1087483cd - check::callee::confirm_builtin_call::hc9f0878ba333a19fNkm
  18:        0x1086e6cb6 - check::callee::check_call::hd35b84bf2d6b58f7Sbm
  19:        0x1086d178a - check::check_expr_with_expectation_and_lvalue_pref::he337646483dc09cd8Hr
  20:        0x1087014bd - check::check_decl_initializer::h4ab29c1087c52ea8RUs
  21:        0x108701590 - check::check_decl_local::he9d8dbcafd84118f3Vs
  22:        0x108701825 - check::check_stmt::h9f0320269d23967cNXs
  23:        0x1086acd1a - check::check_block_with_expected::h8b413e75ec65de5eA1s
  24:        0x1086a3688 - check::check_fn::h3fd8a6bec4190345XWo
  25:        0x1086a0d6f - check::check_bare_fn::h245a5fd39660f1ecqMo
  26:        0x1086b1daa - check::check_method_body::he0085f6ddf3109464mp
  27:        0x10869bda9 - check::check_item_body::hb2b3af44521a0307Xbp
  28:        0x108694928 - check::check_item_bodies::h756f6be30ffaa021dKo
  29:        0x10868c405 - check_crate::h288f4573dd9eece3IGC
  30:        0x1084135b1 - driver::phase_3_run_analysis_passes::_$u7b$$u7b$closure$u7d$$u7d$::closure.29921
  31:        0x108411be9 - middle::ty::context::TyCtxt<'tcx>::create_and_enter::h14982197898393062399
  32:        0x10840e5ad - driver::phase_3_run_analysis_passes::h10469946015979689481
  33:        0x1083e178e - driver::compile_input::hfe917584d5fff413Pca
  34:        0x1083cedb7 - run_compiler::h01319ef2912a48felQc
  35:        0x1083cc462 - sys_common::unwind::try::try_fn::h5286116259890539823
  36:        0x10c8dbd6b - __rust_try
  37:        0x10c8dbcf3 - sys_common::unwind::inner_try::hab8f8e132b20c6f3uru
  38:        0x1083cccf9 - boxed::F.FnBox<A>::call_box::h2979158220400435295
  39:        0x10c8e67ec - sys::thread::Thread::new::thread_start::h78b200bc5c33e143Rkz
  40:     0x7fff89c0bc12 - _pthread_body
  41:     0x7fff89c0bb8f - _pthread_start

Could not compile `pinkc`.

To learn more, run the command again with --verbose.

compiling this crate: https://github.com/ubsan/pink/tree/c625d31661e3381f5173d2789ff4c8d809210d2f

Activity

  1. strega-nil commented on Mar 17, 2016

    @strega-nil
    ContributorAuthor

    The issue is on src/ast/expr.rs:172. I make a new Vec, instead of a new HashMap.

  2. strega-nil commented on Mar 17, 2016

    @strega-nil
    ContributorAuthor

    Ping @nikomatsakis, because it seems to be a bug in the Forest of Obligation

  3. added
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    on Mar 18, 2016
  4. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Mar 18, 2016
  5. nikomatsakis commented on Mar 18, 2016

    @nikomatsakis
    Contributor

    triage: P-medium

  6. self-assigned this
    on Mar 18, 2016
  7. allan-simon commented on Apr 27, 2016

    @allan-simon

    an other code that seems to trigger the same ICE http://is.gd/bZ6QYu

  8. added a commit that references this issue on May 24, 2016
    c209d44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions