Skip to content

ICE when accessing externed DST #36122

Closed

Description

I realize it's kinda nonsensical, but here:

fn main() {
    extern {
        static symbol: [usize];
    }
    println!("{}", symbol[0]);
}
thread 'rustc' panicked at 'assertion failed: self.llextra != ptr::null_mut()', ../src/librustc_trans/mir/lvalue.rs:64
stack backtrace:
   1:     0x7f8aedf3eb13 - std::sys::backtrace::tracing::imp::write::h46f28e67d38b4637
   2:     0x7f8aedf4f40d - std::panicking::default_hook::{{closure}}::h1d3243f546573ff4
   3:     0x7f8aedf4d95d - std::panicking::default_hook::h96c288d728df3ebf
   4:     0x7f8aedf4e058 - std::panicking::rust_panic_with_hook::hb1322e5f2588b4db
   5:     0x7f8aed023f9f - std::panicking::begin_panic::h0914615a412ba184
   6:     0x7f8aed0fd12b - rustc_trans::mir::lvalue::LvalueRef::len::h7704b2160ae8eef8
   7:     0x7f8aed10216f - rustc_trans::mir::rvalue::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_rvalue_operand::hc6bf66aa2cc81d96
   8:     0x7f8aed0ed8e4 - rustc_trans::mir::block::<impl rustc_trans::mir::MirContext<'bcx, 'tcx>>::trans_block::he2f6252e2877e76b
   9:     0x7f8aed0eb438 - rustc_trans::mir::trans_mir::hc6963a43e5e7752b
  10:     0x
7f8aed08aeae - rustc_trans::base::trans_closure::h2174ffc103f3d309
  11:     0x7f8aed10de82 - rustc_trans::trans_item::TransItem::define::h159a1f0a8708f3d3
  12:     0x7f8aed08e3b3 - rustc_trans::base::trans_crate::hf067cf9d0a8bcbf2
  13:     0x7f8aee308962 - rustc_driver::driver::phase_4_translate_to_llvm::he9d5d0022988d46e
  14:     0x7f8aee3439a0 - rustc_driver::driver::compile_input::{{closure}}::h13e3af2358852a64
  15:     0x7f8aee340450 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::h63e83c14f91c1ee5
  16:     0x7f8aee286a5f - rustc::ty::context::TyCtxt::create_and_enter::h6d5dc8f8bc2765a0
  17:     0x7f8aee2f7f64 - rustc_driver::driver::compile_input::h7dacd98cd2fd7d2b
  18:     0x7f8aee31e05d - rustc_driver::run_compiler::h37c4294ab73436f7
  19:     0x7f8aee25fbb3 - std::panicking::try::do_call::h4d040997e2efdaf3
  20:     0x7f8aedf5d626 - __rust_maybe_catch_panic
  21:     0x7f8aee27cf19 - <F as alloc::boxed::FnBox<A>>::call_box::hefd1c85fab3e6c31
  22:     0x7f8aedf4be90 - std::sys::thread::Thread::new::thread_start::h5b631f48cd23f128
  23:     0x7f8ae63b06f9 - start_thread
  24:     0x7f8aedb8fb5c - clone
  25:                0x0 - <unknown>
rustc 1.13.0-nightly (acd3f796d 2016-08-28)
binary: rustc
commit-hash: acd3f796d26e9295db1eba1ef16e0d4cc3b96dd5
commit-date: 2016-08-28
host: x86_64-unknown-linux-gnu
release: 1.13.0-nightly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions