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

compiler panic #37923

Closed
tspiteri opened this issue Nov 21, 2016 · 2 comments
Closed

compiler panic #37923

tspiteri opened this issue Nov 21, 2016 · 2 comments

Comments

@tspiteri
Copy link
Contributor

Just after a git pull, the compiler started to panic after cargo build.

$ RUST_BACKTRACE=1 cargo build
   Compiling ...
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 407902 but the index is 407902', ../src/libserialize/leb128.rs:46
stack backtrace:
   1:     0x7ff2816f085f - std::sys::backtrace::tracing::imp::write::h6f1d53a70916b90d
   2:     0x7ff2816ffdbd - std::panicking::default_hook::{{closure}}::h137e876f7d3b5850
   3:     0x7ff2816fd22e - std::panicking::default_hook::h0ac3811ec7cee78c
   4:     0x7ff2816fd918 - std::panicking::rust_panic_with_hook::hc303199e04562edf
   5:     0x7ff2816fd7b2 - std::panicking::begin_panic::h6ed03353807cf54d
   6:     0x7ff2816fd6f0 - std::panicking::begin_panic_fmt::hc321cece241bb2f5
   7:     0x7ff2816fd671 - rust_begin_unwind
   8:     0x7ff28174afff - core::panicking::panic_fmt::h27224b181f9f037f
   9:     0x7ff28174afa3 - core::panicking::panic_bounds_check::h19e9bbc59320a57e
  10:     0x7ff27aa872ef - <serialize::opaque::Decoder<'a> as serialize::serialize::Decoder>::read_usize::hdb6b9929c2878103
  11:     0x7ff27f360798 - rustc_metadata::decoder::<impl rustc_metadata::cstore::MetadataBlob>::get_root::ha0bece0640a71bb4
  12:     0x7ff27f3893bf - rustc_metadata::loader::Context::extract_one::h893f537a80fcaa7b
  13:     0x7ff27f386729 - rustc_metadata::loader::Context::find_library_crate::h0ae9ebab39601e07
  14:     0x7ff27f3750b9 - rustc_metadata::creader::CrateReader::load::hbbb9048f37b5929d
  15:     0x7ff27f3744d8 - rustc_metadata::creader::CrateReader::resolve_crate::h0ea8ce3f005d5018
  16:     0x7ff27f39259a - rustc_metadata::creader::CrateReader::resolve_crate_deps::{{closure}}::hba6352ef73c55dfc
  17:     0x7ff27f306c16 - <std::collections::hash::map::HashMap<K, V, S> as core::iter::traits::FromIterator<(K, V)>>::from_iter::hfdd794029d934f9e
  18:     0x7ff27f37284f - rustc_metadata::creader::CrateReader::register_crate::h5c79c40329468538
  19:     0x7ff27f3798bb - rustc_metadata::creader::CrateReader::read_macros::hbcdddd25556965a6
  20:     0x7ff27f38c5db - rustc_metadata::macro_import::load_macros::hf8ed055f967f056a
  21:     0x7ff27f37ed0b - <rustc_metadata::creader::CrateLoader<'a> as rustc::middle::cstore::CrateLoader>::load_macros::h1c3dc5592ec08b80
  22:     0x7ff280cd3104 - <rustc_resolve::macros::ExpansionVisitor<'a, 'b> as syntax::visit::Visitor>::visit_item::he806776e3c2c5c85
  23:     0x7ff280cca2ef - syntax::visit::walk_item::h9ee859a018283218
  24:     0x7ff280cd3eaa - <rustc_resolve::macros::ExpansionVisitor<'a, 'b> as syntax::visit::Visitor>::visit_item::he806776e3c2c5c85
  25:     0x7ff280cd0b9a - rustc_resolve::macros::<impl syntax::ext::base::Resolver for rustc_resolve::Resolver<'a>>::visit_expansion::h095f31c8c14629f1
  26:     0x7ff27b2d00e6 - syntax::ext::expand::MacroExpander::collect_invocations::h3001d1fc85715c10
  27:     0x7ff27b2cc432 - syntax::ext::expand::MacroExpander::expand::hba1d6fcc6652f3dc
  28:     0x7ff27b2cbc92 - syntax::ext::expand::MacroExpander::expand_crate::hee7239fe3665f838
  29:     0x7ff27b2d7eed - syntax::ext::expand::expand_crate::h9213ee787f1c5e5d
  30:     0x7ff281abbb5d - rustc_driver::driver::phase_2_configure_and_expand::{{closure}}::hb36e77d125a4fd93
  31:     0x7ff281a7048f - rustc_driver::driver::phase_2_configure_and_expand::h2f62e5b496da5c2b
  32:     0x7ff281a69efb - rustc_driver::driver::compile_input::hef221f9f618e92f5
  33:     0x7ff281a96206 - rustc_driver::run_compiler::h7dddd4089f8330b4
  34:     0x7ff2819d22c3 - std::panicking::try::do_call::h1e3ece12e3f812df
  35:     0x7ff281707cb6 - __rust_maybe_catch_panic
  36:     0x7ff2819f04f9 - <F as alloc::boxed::FnBox<A>>::call_box::h05b222e46803eb30
  37:     0x7ff2816fbc80 - std::sys::thread::Thread::new::thread_start::h759e10bc4abc7e72
  38:     0x7ff27a64d5c9 - start_thread
  39:     0x7ff2813c30ec - __clone
  40:                0x0 - <unknown>

error: Could not compile ...

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

These are the tool versions:

$ cargo --version
cargo 0.13.0-nightly (eca9e15 2016-11-01)
$ 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

After I deleted the target directory, everything was fine.

@tspiteri
Copy link
Contributor Author

tspiteri commented Nov 21, 2016

I've done some more testing and the following sequence seems to be causing the panic:

$ cargo clean
$ rustup run nightly cargo clippy
$ cargo build

Versions of nightly and clippy:

$ rustup run nightly cargo --version
cargo 0.16.0-nightly (d1bfc01 2016-11-18)
$ rustup run nightly rustc --version --verbose
rustc 1.15.0-nightly (0bd2ce62b 2016-11-19)
binary: rustc
commit-hash: 0bd2ce62b27e2b9a7dfe92fc23d9098854008089
commit-date: 2016-11-19
host: x86_64-unknown-linux-gnu
release: 1.15.0-nightly
LLVM version: 3.9
$ grep clippy ~/.cargo/.crates.toml
"clippy 0.0.100 (registry+https://github.com/rust-lang/crates.io-index)" = ["cargo-clippy"]

@tspiteri
Copy link
Contributor Author

I think this is a dupe of #37803. Closing.

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

1 participant