-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE: 'rustc' panicked at 'assertion failed: *start <= *end' in slice.rs:396 #18490
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Could you run |
oh, of course! 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/build/src
/libcore/slice.rs:396
stack backtrace:
1: 0x10d976929 - rt::backtrace::imp::write::hfe87245730e40e498nq
2: 0x10d979b6c - failure::on_fail::h250240fc1d2cc13cHEq
3: 0x10dbdb395 - unwind::begin_unwind_inner::h629bbfd5c5c7ad4bSJd
4: 0x10dbdb02f - unwind::begin_unwind_fmt::h26eed6b8c9614d01kHd
5: 0x10dbdad82 - rust_begin_unwind
6: 0x10dc315dc - panicking::panic_fmt::h9773bd98fc91f575h7j
7: 0x10dc2806f - panicking::panic::hf2209879fd0a6385l4j
8: 0x10aaee5eb - middle::typeck::check::vtable::check_object_safety::hd2ef41a3d3297642CBN
9: 0x10ab588db - middle::typeck::check::FnCtxt<'a, 'tcx>::register_unsize_obligations::h93da532586d1f760GhX
10: 0x10ab58770 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_autoref_obligations::hdcb3d01fc6bc2a0bEgX
11: 0x10ab58791 - middle::typeck::check::FnCtxt<'a, 'tcx>::register_autoref_obligations::hdcb3d01fc6bc2a0bEgX
12: 0x10ab345b7 - middle::typeck::check::FnCtxt<'a, 'tcx>::write_adjustment::h559300c55596d0cbIdX
13: 0x10ab255fb - middle::typeck::check::FnCtxt<'a, 'tcx>::mk_assignty::h495121b0f62037e0xvX
14: 0x10ab253c5 - middle::typeck::check::demand::coerce::h94b3644e227f71a2RPR
15: 0x10ab85f09 - middle::typeck::check::check_expr_coercable_to_type::closure.132412
16: 0x10ab7ded6 - middle::typeck::check::check_expr_with_unifier::h69de001b4060f90bdJY
17: 0x10abce4d3 - middle::typeck::check::check_decl_local::h0cae6d84e687454cWJ0
18: 0x10abce647 - middle::typeck::check::check_stmt::h46c2f90bba03a179WL0
19: 0x10ab49acf - middle::typeck::check::check_block_with_expected::hde19a8324d3b35305P0
20: 0x10ab45862 - middle::typeck::check::check_fn::h6804afcefd6fc458pvV
21: 0x10ab44d8f - middle::typeck::check::check_bare_fn::hb7e7210980026133EkV
22: 0x10ab4c530 - middle::typeck::check::check_method_body::h36c9acd490135be6xPV
23: 0x10ab41d58 - middle::typeck::check::check_item::h39bec44c2e37ec07NEV
24: 0x10ab44462 - visit::Visitor::visit_mod::h8897482306723449792
25: 0x10ab42fb0 - visit::walk_item::h18177613619592010200
26: 0x10ab4446d - visit::Visitor::visit_mod::h8897482306723449792
27: 0x10ab42fb0 - visit::walk_item::h18177613619592010200
28: 0x10ab44bea - middle::typeck::check::check_item_types::h232f3854bb5459bfOjV
29: 0x10a6571a6 - util::common::time::h13516290540542203264
30: 0x10ae04d7e - middle::typeck::check_crate::h6b2f140055619821A3n
31: 0x10ae6dadf - driver::driver::phase_3_run_analysis_passes::h9af5661d865aaa0elNA
32: 0x10ae683a8 - driver::driver::compile_input::h64933a02c4abd95e6tA
33: 0x10aee5b88 - driver::run_compiler::h37c520fe594ec038KgE
34: 0x10aee3dae - driver::run::closure.145405
35: 0x10a66f64b - task::TaskBuilder<S>::try_future::closure.103660
36: 0x10a66f543 - task::TaskBuilder<S>::spawn_internal::closure.103631
37: 0x10d69ba4d - task::NativeSpawner.Spawner::spawn::closure.8535
38: 0x10dc4124c - rust_try_inner
39: 0x10dc41236 - rust_try
40: 0x10dbd8a17 - unwind::try::h554e9d30ab8d9725cyd
41: 0x10dbd88ac - task::Task::run::h39093ecd59554b49ZJc
42: 0x10d69b873 - task::NativeSpawner.Spawner::spawn::closure.8472
43: 0x10dbda1c7 - thread::thread_start::h589be8c0a398d299e5c
44: 0x7fff981f52fc - _pthread_body
45: 0x7fff981f5279 - _pthread_body |
I'm getting this too, on Linux x64:
(Link to the full Rustc's version (installed from thestinger's Arch repos:
|
Same here: $ RUST_BACKTRACE=1 cargo build stack backtrace: $ rustc --version=verbose |
cc @nick29581 |
@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! |
For me, it's just a new empty project (cargo new --git) which I added some dependencies to: Cargo.toml: [package] name = "sprs" [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 #[test] |
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:
|
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 |
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.. |
Minimal example:
|
This also fixes rust-lang#18490 as a side-effect by avoiding a later out-of-bounds slice.
Same issue here: trait Command { fn name() -> &'static str; }
struct Init;
impl Command for Init { fn name() -> &'static str { "init" } }
fn main() { let cmd = box Init as Box<Command>; } with the backtrace:
|
Is the example I gave unrelated ? Because it's still give me the same backtrace :/ Side question: Is the online compiler up-to-date (as a nightly build is) ? |
minor: Rename `dyn compatible` to `dyn-compatible`
I'm getting the following ICE
when compiling my project against the latest OSX nightly
rustc 0.13.0-nightly (221fc1e3c 2014-10-31 02:27:15 +0000)
.The text was updated successfully, but these errors were encountered: