Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Out of bounds indexing panic in save_analysis #755

Closed
sfackler opened this issue Mar 8, 2018 · 4 comments
Closed

Out of bounds indexing panic in save_analysis #755

sfackler opened this issue Mar 8, 2018 · 4 comments
Labels

Comments

@sfackler
Copy link
Member

sfackler commented Mar 8, 2018

The crate doesn't compile, but also doesn't ICE.

thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', /Users/travis/build/rust-lang/rust/src/libcore/slice/mod.rs:865:10
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::_print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: core::ops::function::Fn::call
   5: std::panicking::rust_panic_with_hook
   6: std::panicking::begin_panic_fmt
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic_bounds_check
  10: <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O> as syntax::visit::Visitor<'l>>::visit_expr
  11: syntax::visit::walk_expr
  12: <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O>>::process_method_call
  13: syntax::visit::walk_expr
  14: syntax::visit::walk_expr
  15: <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O>>::process_method
  16: <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O>>::process_impl_item
  17: <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O> as syntax::visit::Visitor<'l>>::visit_item
  18: <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O> as syntax::visit::Visitor<'l>>::visit_item
  19: <rustc_save_analysis::dump_visitor::DumpVisitor<'l, 'tcx, 'll, O> as syntax::visit::Visitor<'l>>::visit_mod
  20: <rustc_save_analysis::CallbackHandler<'b> as rustc_save_analysis::SaveHandler>::save
  21: <rls::build::rustc::RlsRustcCalls as rustc_driver::CompilerCalls<'a>>::build_controller::{{closure}}
  22: rustc_driver::driver::compile_input::{{closure}}
  23: rustc::ty::context::TyCtxt::create_and_enter
  24: rustc_driver::driver::compile_input
  25: rustc_driver::run_compiler

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: rustc 1.26.0-nightly (2789b067d 2018-03-06) running on x86_64-apple-darwin
@sfackler
Copy link
Member Author

sfackler commented Mar 8, 2018

Here are the build errors at the point that this happened. It's nothing very exotic.

error[E0061]: this function takes 1 parameter but 2 parameters were supplied
    --> epoch-http/src/v1.rs:1043:17
     |
1043 |                 StreamedSerializable(self.0, self.1).into_response(request)
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 parameter
...
1076 | pub struct StreamedSerializable<T>(T);
     | -------------------------------------- defined here

error[E0612]: attempted out-of-bounds tuple index `1` on type `v1::StreamingPointsResponse`
    --> epoch-http/src/v1.rs:1043:46
     |
1043 |                 StreamedSerializable(self.0, self.1).into_response(request)
     |                                              ^^^^^^

error: aborting due to 2 previous errors

@sfackler
Copy link
Member Author

sfackler commented Mar 8, 2018

This was off of a cleaned workspace if that's relevant.

@nrc nrc added the bug label Mar 8, 2018
@nrc
Copy link
Member

nrc commented Mar 8, 2018

There's a PR that fixes errors on tuple indexing in the queue right now, so hopefully that will fix this soon.

@nrc
Copy link
Member

nrc commented Apr 19, 2018

Assuming this is fixed, please comment if not and I'll re-open

@nrc nrc closed this as completed Apr 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants