Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE from inside libserialize (index out of bounds) #38139

Closed
sdleffler opened this issue Dec 3, 2016 · 2 comments
Closed

ICE from inside libserialize (index out of bounds) #38139

sdleffler opened this issue Dec 3, 2016 · 2 comments

Comments

@sdleffler
Copy link
Contributor

sdleffler commented Dec 3, 2016

Dealing with the (now current) issues with nightly cargo, I decided to run cargo update, rustup default stable and then cargo build. The result was this:

sean@sean-Samus:~/Projects/tll-array$ RUST_BACKTRACE=1 cargo build --verbose
       Fresh type-operators v0.3.4
       Fresh void v1.0.2
       Fresh type-level-logic v0.1.0
       Fresh unreachable v0.1.1
       Fresh tll-iterator v0.1.0 (https://github.com/sdleffler/tll-iterator-rs.git#95b65ff1)
   Compiling tll-array v0.1.0 (file:///home/sean/Projects/tll-array)
     Running `rustc src/lib.rs --crate-name tll_array --crate-type lib -g -C metadata=60569300049d440b --out-dir /home/sean/Projects/tll-array/target/debug/deps --emit=dep-info,link -L dependency=/home/sean/Projects/tll-array/target/debug/deps --extern type_operators=/home/sean/Projects/tll-array/target/debug/deps/libtype_operators-d56a22000476e4e5.rlib --extern unreachable=/home/sean/Projects/tll-array/target/debug/deps/libunreachable-cf0b03299c3c2c2d.rlib --extern tll_iterator=/home/sean/Projects/tll-array/target/debug/deps/libtll_iterator-0e29413326ade8e9.rlib --extern type_level_logic=/home/sean/Projects/tll-array/target/debug/deps/libtype_level_logic-8b7ddf90d709f195.rlib`
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 109251 but the index is 109251', ../src/libserialize/leb128.rs:46
stack backtrace:
   1:     0x7fe4a217885f - std::sys::backtrace::tracing::imp::write::h6f1d53a70916b90d
   2:     0x7fe4a2187dbd - std::panicking::default_hook::{{closure}}::h137e876f7d3b5850
   3:     0x7fe4a218522e - std::panicking::default_hook::h0ac3811ec7cee78c
   4:     0x7fe4a2185918 - std::panicking::rust_panic_with_hook::hc303199e04562edf
   5:     0x7fe4a21857b2 - std::panicking::begin_panic::h6ed03353807cf54d
   6:     0x7fe4a21856f0 - std::panicking::begin_panic_fmt::hc321cece241bb2f5
   7:     0x7fe4a2185671 - rust_begin_unwind
   8:     0x7fe4a21d2fff - core::panicking::panic_fmt::h27224b181f9f037f
   9:     0x7fe4a21d2fa3 - core::panicking::panic_bounds_check::h19e9bbc59320a57e
  10:     0x7fe49b5082ef - <serialize::opaque::Decoder<'a> as serialize::serialize::Decoder>::read_usize::hdb6b9929c2878103
  11:     0x7fe49fde1798 - rustc_metadata::decoder::<impl rustc_metadata::cstore::MetadataBlob>::get_root::ha0bece0640a71bb4
  12:     0x7fe49fe0a3bf - rustc_metadata::loader::Context::extract_one::h893f537a80fcaa7b
  13:     0x7fe49fe07729 - rustc_metadata::loader::Context::find_library_crate::h0ae9ebab39601e07
  14:     0x7fe49fdf60b9 - rustc_metadata::creader::CrateReader::load::hbbb9048f37b5929d
  15:     0x7fe49fdf54d8 - rustc_metadata::creader::CrateReader::resolve_crate::h0ea8ce3f005d5018
  16:     0x7fe49fe1359a - rustc_metadata::creader::CrateReader::resolve_crate_deps::{{closure}}::hba6352ef73c55dfc
  17:     0x7fe49fd87c16 - <std::collections::hash::map::HashMap<K, V, S> as core::iter::traits::FromIterator<(K, V)>>::from_iter::hfdd794029d934f9e
  18:     0x7fe49fdf384f - rustc_metadata::creader::CrateReader::register_crate::h5c79c40329468538
  19:     0x7fe49fdf5853 - rustc_metadata::creader::CrateReader::resolve_crate::h0ea8ce3f005d5018
  20:     0x7fe49fdfdf86 - <rustc_metadata::creader::CrateLoader<'a> as rustc::middle::cstore::CrateLoader>::process_item::h2c1f1f8ea009fc17
  21:     0x7fe4a1756cfa - <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor<'a, 'b> as syntax::visit::Visitor>::visit_item::hca6f65f5d1f072d8
  22:     0x7fe4a1755fbe - rustc_resolve::build_reduced_graph::<impl rustc_resolve::Resolver<'b>>::build_reduced_graph::h394847c4f1568da6
  23:     0x7fe4a254417b - rustc_driver::driver::phase_2_configure_and_expand::{{closure}}::hdfad824fa7e49709
  24:     0x7fe4a24faa58 - rustc_driver::driver::phase_2_configure_and_expand::h2f62e5b496da5c2b
  25:     0x7fe4a24f1efb - rustc_driver::driver::compile_input::hef221f9f618e92f5
  26:     0x7fe4a251e206 - rustc_driver::run_compiler::h7dddd4089f8330b4
  27:     0x7fe4a245a2c3 - std::panicking::try::do_call::h1e3ece12e3f812df
  28:     0x7fe4a218fcb6 - __rust_maybe_catch_panic
  29:     0x7fe4a24784f9 - <F as alloc::boxed::FnBox<A>>::call_box::h05b222e46803eb30
  30:     0x7fe4a2183c80 - std::sys::thread::Thread::new::thread_start::h759e10bc4abc7e72
  31:     0x7fe49b0cd6f9 - start_thread
  32:     0x7fe4a1e47b5c - clone
  33:                0x0 - <unknown>

error: Could not compile `tll-array`.

Caused by:
  process didn't exit successfully: `rustc src/lib.rs --crate-name tll_array --crate-type lib -g -C metadata=60569300049d440b --out-dir /home/sean/Projects/tll-array/target/debug/deps --emit=dep-info,link -L dependency=/home/sean/Projects/tll-array/target/debug/deps --extern type_operators=/home/sean/Projects/tll-array/target/debug/deps/libtype_operators-d56a22000476e4e5.rlib --extern unreachable=/home/sean/Projects/tll-array/target/debug/deps/libunreachable-cf0b03299c3c2c2d.rlib --extern tll_iterator=/home/sean/Projects/tll-array/target/debug/deps/libtll_iterator-0e29413326ade8e9.rlib --extern type_level_logic=/home/sean/Projects/tll-array/target/debug/deps/libtype_level_logic-8b7ddf90d709f195.rlib` (exit code: 101)
sean@sean-Samus:~/Projects/tll-array$ cargo --version --verbose
cargo 0.13.0-nightly (eca9e15 2016-11-01)
sean@sean-Samus:~/Projects/tll-array$ rustc --version --verbose
rustc 1.13.0 (2c6933acc 2016-11-07)
binary: rustc
commit-hash: 2c6933acc05c61e041be764cb1331f6281993f3f
commit-date: 2016-11-07
host: x86_64-unknown-linux-gnu
release: 1.13.0

I'm not sure that any of my code itself was responsible for this ICE, so I haven't pasted/linked any of it here. If that is not the case, please let me know.

Tesing a little further, this also occurs with beta rustc:

sean@sean-Samus:~/Projects/tll-array$ rustc --version --verbose
rustc 1.14.0-beta.2 (e627a2e6e 2016-11-16)
binary: rustc
commit-hash: e627a2e6edbc7b7fd205de8ca7c86cff76655f4d
commit-date: 2016-11-16
host: x86_64-unknown-linux-gnu
release: 1.14.0-beta.2
LLVM version: 3.9
@est31
Copy link
Member

est31 commented Dec 3, 2016

This looks like its a dupe of #37803 ...

@sdleffler
Copy link
Contributor Author

@est31 seems likely enough. I got it to work again after switching back to nightly, anyways.

@arielb1 arielb1 closed this as completed Dec 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants