Skip to content

Unexpected panic with 1.0 stable. #25862

Closed
@decafbad

Description

@decafbad

rustc 1.0.0 (a59de37 2015-05-13) (built 2015-05-14)
binary: rustc
commit-hash: a59de37
commit-date: 2015-05-13
build-date: 2015-05-14
host: x86_64-unknown-linux-gnu
release: 1.0.0

I wanted to check this code successfully compiles. Gave a "cargo test" instead of "build", and kaboom.

#[test]
fn yerler() {
    fn utule(arr: &[[u8]]) -> [u8; 81] {
        let mut newarr = [0_u8; 81];
        for i in 0..10 {
            for j in 0..10 {
                newarr[i*9+j] = arr[i][j];
            }
        }
        newarr
    }
}
thread 'rustc' panicked at 'assertion failed: slice_layout_is_correct(cx, &member_llvm_types[..], element_type)', /home/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-linux/build/src/librustc_trans/trans/debuginfo.rs:2810

stack backtrace:
   1:     0x7f4abb29e449 - sys::backtrace::write::hbc46dc0cfb3b9537d4r
   2:     0x7f4abb2a6156 - panicking::on_panic::h74d3c14d86c58ac8jrw
   3:     0x7f4abb269462 - rt::unwind::begin_unwind_inner::h382cea404b11eb00t6v
   4:     0x7f4aba96437e - rt::unwind::begin_unwind::h11527883117899559464
   5:     0x7f4abaa65f33 - trans::debuginfo::vec_slice_metadata::hf94e0b5f0c2f2a50cgy
   6:     0x7f4abaa517fc - trans::debuginfo::type_metadata::h61fa8cb587a59ac0Ioy
   7:     0x7f4abaa664c0 - trans::debuginfo::subroutine_type_metadata::h0a8adba26e117853iky
   8:     0x7f4abaa511d4 - trans::debuginfo::type_metadata::h61fa8cb587a59ac0Ioy
   9:     0x7f4aba9bd8b6 - trans::debuginfo::create_function_debug_context::hce33e3e89c0b549eG0w
  10:     0x7f4aba9bbd16 - trans::base::new_fn_ctxt::hc47263521fb5ebc7Djh
  11:     0x7f4aba9c4f10 - trans::base::trans_closure::h8e5687f4ccb96c5eLCh
  12:     0x7f4aba9c90ea - trans::base::trans_fn::h0bc8fb6dbe17d6adtNh
  13:     0x7f4aba9cc177 - trans::base::trans_item::h4f9c99b1e4474396Fbi
  14:     0x7f4aba9d2ed5 - visit::walk_block::h14547825370956947583
  15:     0x7f4aba9cca16 - trans::base::trans_item::h4f9c99b1e4474396Fbi
  16:     0x7f4aba9da56d - trans::base::trans_crate::haa02506df24d5efcF0i
  17:     0x7f4abb7ec0fa - driver::phase_4_translate_to_llvm::h86d6fb84c5c936d5hOa
  18:     0x7f4abb7c3faa - driver::compile_input::hb78754f2f33c01efQba
  19:     0x7f4abb8854d1 - run_compiler::h258d36d5501c1cdfz4b
  20:     0x7f4abb883122 - boxed::F.FnBox<A>::call_box::h7239693171334256553
  21:     0x7f4abb882659 - rt::unwind::try::try_fn::h14329119008520845439
  22:     0x7f4abb318ac8 - rust_try_inner
  23:     0x7f4abb318ab5 - rust_try
  24:     0x7f4abb882908 - boxed::F.FnBox<A>::call_box::h17332056298259451807
  25:     0x7f4abb2a5041 - sys::thread::create::thread_start::h490278b5c3c0b49faqv
  26:     0x7f4ab5b2cdf4 - start_thread
  27:     0x7f4abaeef1ac - __clone
  28:     0x0 - <unknown>

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions