Closed
Description
I'm getting the following ICE
mindTree:RustyJen Mitch$ cargo build
Compiling jen v0.0.0 (file:///Users/Mitch/Programming/Rust/RustyJen)
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' panicked at 'assertion failed: *start <= *end', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/b
uild/src/libcore/slice.rs:396
when compiling my project against the latest OSX nightly rustc 0.13.0-nightly (221fc1e3c 2014-10-31 02:27:15 +0000)
.
Metadata
Metadata
Assignees
Labels
No labels
Activity
msiemens commentedon Oct 31, 2014
Could you run
cargo build
again withRUST_BACKTRACE=1
(=RUST_BACKTRACE=1 cargo build
) and post the backtrace here?mitchmindtree commentedon Oct 31, 2014
oh, of course!
UberLambda commentedon Oct 31, 2014
I'm getting this too, on Linux x64:
(Link to the full
RUST_LOG=debug RUST_BACKTRACE=1 cargo build --verbose
)Rustc's version (installed from thestinger's Arch repos:
parbo commentedon Oct 31, 2014
Same here:
$ RUST_BACKTRACE=1 cargo build
Compiling protobuf v0.0.1 (https://github.com/stepancheg/rust-protobuf.git#cd5c700d)
Compiling rust-crypto v0.1.0 (https://github.com/DaGenix/rust-crypto.git#bd9f0970)
Compiling nix v0.0.1 (https://github.com/carllerche/nix-rust#69437208)
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with
RUST_BACKTRACE=1
for a backtracetask 'rustc' panicked at 'assertion failed: *start <= *end', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/slice.rs:396
stack backtrace:
1: 0x7fb85e59daf0 - rt::backtrace::imp::write::h78410bf389422bb4Afq
2: 0x7fb85e5a0bf0 - failure::on_fail::h3d7a049ab1da182dXAq
3: 0x7fb862adfe30 - unwind::begin_unwind_inner::ha5ca26286b78bd8fdSd
4: 0x7fb862adf950 - unwind::begin_unwind_fmt::h9ff359c82ebbcec0FPd
5: 0x7fb862adf910 - rust_begin_unwind
6: 0x7fb862b2b1a0 - panicking::panic_fmt::h6d1e7e05d89e9577h7j
7: 0x7fb862b26a50 - panicking::panic::h9595095b841fe7bal4j
8: 0x7fb8635f2050 - middle::typeck::check::vtable::check_object_safety::h909babbc174b8351CBN
9: 0x7fb86365f600 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_unsize_obligations::h7602815ae022d228GhX
10: 0x7fb86365f570 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_autoref_obligations::h0590f015c52acbc0EgX
11: 0x7fb86365f570 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_autoref_obligations::h0590f015c52acbc0EgX
12: 0x7fb86363aa80 - middle::typeck::check::FnCtxt<'a, 'tcx>::write_adjustment::h1396e48fc524a05dIdX
13: 0x7fb86362b520 - middle::typeck::check::FnCtxt<'a, 'tcx>::mk_assignty::ha58af6f758d897bdxvX
14: 0x7fb86362b210 - middle::typeck::check::demand::coerce::h48183cae82ca7869RPR
15: 0x7fb86368e000 - middle::typeck::check::check_expr_coercable_to_type::closure.132386
16: 0x7fb863684970 - middle::typeck::check::check_expr_with_unifier::h9021eb76dad51ef5dJY
17: 0x7fb863682dd0 - middle::typeck::check::check_argument_types::h1928dcb07649510889X
18: 0x7fb863684970 - middle::typeck::check::check_expr_with_unifier::h9021eb76dad51ef5dJY
19: 0x7fb8636501a0 - middle::typeck::check::check_block_with_expected::hbcf547bf91ace5705P0
20: 0x7fb86364b770 - middle::typeck::check::check_fn::hc80418f404e5c598pvV
21: 0x7fb86364b4b0 - middle::typeck::check::check_bare_fn::h1dd0be1cd95d0c63EkV
22: 0x7fb863652ca0 - middle::typeck::check::check_method_body::h131e48693ec30c1axPV
23: 0x7fb8636471c0 - middle::typeck::check::check_item::hfa9ed324eb120d1cNEV
24: 0x7fb86364ac30 - visit::Visitor::visit_mod::h4776340902026008023
25: 0x7fb863649760 - visit::walk_item::h1837381033057518270
26: 0x7fb86364af80 - middle::typeck::check::check_item_types::h7314688a92a7a43fOjV
27: 0x7fb863146590 - util::common::time::h1086293170624038403
28: 0x7fb86391db90 - middle::typeck::check_crate::h707090d761adfc72A3n
29: 0x7fb863987950 - driver::driver::phase_3_run_analysis_passes::h2dc7f682b53f78f9lNA
30: 0x7fb863982200 - driver::driver::compile_input::hb25c14dfa369b7d96tA
31: 0x7fb863a048b0 - driver::run_compiler::h3e5318d61e864690KgE
32: 0x7fb863a047a0 - driver::run::closure.145379
33: 0x7fb86315f370 - task::TaskBuilder
::try_future::closure.10363634: 0x7fb86315f160 - task::TaskBuilder
::spawn_internal::closure.10360735: 0x7fb862e2a1a0 - task::NativeSpawner.Spawner::spawn::closure.8435
36: 0x7fb862b38e30 - rust_try_inner
37: 0x7fb862b38e20 - rust_try
38: 0x7fb862add5e0 - unwind::try::h8c75b93d8c87f5c4xGd
39: 0x7fb862add470 - task::Task::run::h3855d187b4c0788fnMc
40: 0x7fb862e29ee0 - task::NativeSpawner.Spawner::spawn::closure.8373
41: 0x7fb862adecd0 - thread::thread_start::he45c6d58df77cc88C7c
42: 0x7fb85d949fe0 - start_thread
43: 0x7fb8627a9819 - __clone
44: 0x0 -
$ rustc --version=verbose
rustc 0.13.0-nightly (221fc1e 2014-10-31 02:27:15 +0000)
binary: rustc
commit-hash: 221fc1e
commit-date: 2014-10-31 02:27:15 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-nightly
alexcrichton commentedon Oct 31, 2014
cc @nick29581
nrc commentedon Oct 31, 2014
@mitchmindtree @UberLambda @parbo would one of you mind posting the code that caused the ICE please? Even better would be if you could narrow down the code to a minimal test case which causes the crash. Thanks!
parbo commentedon Oct 31, 2014
For me, it's just a new empty project (cargo new --git) which I added some dependencies to:
Cargo.toml:
[package]
name = "sprs"
version = "0.0.1"
authors = ["bohrarper@spotify.com>"]
[dependencies.protobuf]
git = "https://github.com/stepancheg/rust-protobuf.git"
[dependencies.rust-crypto]
git = "https://github.com/DaGenix/rust-crypto.git"
[dependencies.mio]
git = "https://github.com/carllerche/mio.git"
lib.rs:
extern crate crypto
extern crate mio
extern crate rust-protobuf
#[test]
fn it_works() {
}
waterlink commentedon Oct 31, 2014
I have the same problem, but this happens only when I compile my tests/* code. So the problem is probably somewhere there. Code is available here: https://github.com/johnmq/raft-rs/tree/master/tests
And here is my backtrace:
Exposes bug for rust-lang/rust#18490 in tests/node.rs:46 and
waterlink commentedon Oct 31, 2014
I have done a bit of narrowing and got this:
Compiler fails when trying to understand this https://github.com/johnmq/raft-rs/blob/398307167cd7263e6e4a10fb9be287d415c0b902/tests/node.rs#L46
and this line calls this method: https://github.com/johnmq/raft-rs/blob/398307167cd7263e6e4a10fb9be287d415c0b902/src/node.rs#L133-L141
waterlink commentedon Oct 31, 2014
And after playing around with my suspect code I was able to avoid this bug by replacing type annotations of my arguments with parametric types instead of traits. This commit shows it: johnmq/raft-rs@6ba292f .
Basically that means that this bug is related somehow to trait rules changes. If this helps somehow..
stepancheg commentedon Nov 2, 2014
Minimal example:
Always consider static methods object-safe
7 remaining items