Skip to content

Out-of-bounds ICE in middle::infer::freshen::TypeFreshener<'a, 'tcx>.TypeFolder<'tcx>::fold_ty #23583

@Ms2ger

Description

@Ms2ger

https://github.com/Ms2ger/servo/tree/ICE-reftests

../../tests/reftest.rs:116:53: 116:64 error: mismatched types:
 expected `&mut collections::string::String`,
    found `&mut collections::vec::Vec<_>`
(expected struct `collections::string::String`,
    found struct `collections::vec::Vec`) [E0308]
../../tests/reftest.rs:116     command.stderr.as_mut().unwrap().read_to_string(&mut stderr).unwrap();
                                                                               ^~~~~~~~~~~
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
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'index out of bounds: the len is 41 but the index is 41', /home/larsberg/rust/src/libcollections/vec.rs:1324

stack backtrace:
   1:     0x7fb42bc07eb2 - sys::backtrace::write::h754dbf5d2d3172ebPBA
   2:     0x7fb42bc2df32 - panicking::on_panic::hdb9e837ac064f8afiHJ
   3:     0x7fb42bb74649 - rt::unwind::begin_unwind_inner::h488386ed3236ccf5lnJ
   4:     0x7fb42bb749f1 - rt::unwind::begin_unwind_fmt::hac94a0d8ab692f55WlJ
   5:     0x7fb42bc2dab7 - rust_begin_unwind
   6:     0x7fb42bc76724 - panicking::panic_fmt::hf7c6f0a83af17872HZs
   7:     0x7fb42bc7fbdc - panicking::panic_bounds_check::h2968f098aca43b6fNYs
   8:     0x7fb429ca94fb - middle::infer::freshen::TypeFreshener<'a, 'tcx>.TypeFolder<'tcx>::fold_ty::h1a5e0cb5684c2ad9Yrx
   9:     0x7fb429caaadc - middle::ty_fold::TypeFolder::fold_substs::h5300398158458947227
  10:     0x7fb429d2a501 - middle::traits::select::SelectionContext<'cx, 'tcx>::push_stack::had62c407aaefff1fFoT
  11:     0x7fb429d11b63 - middle::traits::select::SelectionContext<'cx, 'tcx>::select::h1778a209ec242fabPwQ
  12:     0x7fb429d0fded - middle::traits::fulfill::FulfillmentContext<'tcx>::select::hff3b9d362aa095f0SjO
  13:     0x7fb429d0f2d7 - middle::traits::fulfill::FulfillmentContext<'tcx>::select_where_possible::h6e2dcbb7c4c56c766iO
  14:     0x7fb42a97afec - check::vtable::select_fcx_obligations_where_possible::h210813ce3575885aUYb
  15:     0x7fb42a9a800a - check::FnCtxt<'a, 'tcx>::resolve_type_vars_if_possible::h83e338cecf621f9eflo
  16:     0x7fb42a96b537 - check::structurally_resolved_type::hd58cd7726b9b557ecit
  17:     0x7fb42aa2e0b5 - check::check_expr_with_unifier::check_method_call::h60e5d1f84dfc769ex6p
  18:     0x7fb42aa528e8 - check::check_expr_with_unifier::h14659721660305131284
  19:     0x7fb42aa2e075 - check::check_expr_with_unifier::check_method_call::h60e5d1f84dfc769ex6p
  20:     0x7fb42aa323a1 - check::check_expr_with_unifier::h3179221947634355639
  21:     0x7fb42aa2db88 - check::check_expr_with_unifier::check_then_else::he1899ac58e1eb65cs9p
  22:     0x7fb42aa32635 - check::check_expr_with_unifier::h3179221947634355639
  23:     0x7fb42aa12d13 - check::check_block_with_expected::h0c9c1f0763267624T2r
  24:     0x7fb42a9faea2 - check::check_fn::h6775964a9a773f5ejmn
  25:     0x7fb42aa104f3 - check::check_bare_fn::h0968defbfcb2f081Zbn
  26:     0x7fb42aa08b4f - check::check_item::hff51cb213b03de05Dun
  27:     0x7fb42aac9273 - check_crate::closure.35767
  28:     0x7fb42aac4d27 - check_crate::hf060d56f18b25f0cjiC
  29:     0x7fb42c22052e - driver::phase_3_run_analysis_passes::h8f28299939675af3mGa
  30:     0x7fb42c205375 - driver::compile_input::h45a329886a3876b7Nba
  31:     0x7fb42c2c9abd - run_compiler::h72656e661c6301b4N6b
  32:     0x7fb42c2c782c - thunk::F.Invoke<A, R>::invoke::h5918203416757842695
  33:     0x7fb42c2c6480 - rt::unwind::try::try_fn::h14589295297083973913
  34:     0x7fb42bc98fd8 - rust_try_inner
  35:     0x7fb42bc98fc5 - rust_try
  36:     0x7fb42c2c6c0b - thunk::F.Invoke<A, R>::invoke::h2343472488528142949
  37:     0x7fb42bc1b735 - sys::thread::thread_start::h04d056c6180f4496s8E
  38:     0x7fb4264a3e99 - start_thread
  39:     0x7fb42b7eb2ec - <unknown>

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