Skip to content

ICE: static call to invalid vtable: VtableFnPointer #20847

Closed
@ghost

Description

#![feature(unboxed_closures)]
use std::ops::Fn;
fn say(x: u32, y: u32) {
    println!("{} {}", x, y);
}
fn main() {
    Fn::call(&say, (1, 2));
}
rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)
binary: rustc
commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7
commit-date: 2015-01-08 17:03:40 -0800
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly
$ RUST_BACKTRACE=1 rustc main.rs
main.rs:7:5: 7:13 warning: use of unstable item: uncertain about variadic generics, input versus associated types, #[warn(unstable)] on by default
main.rs:7     Fn::call(&say, (1, 2));
              ^~~~~~~~
error: internal compiler error: static call to invalid vtable: VtableFnPointer(fn(u32, u32) {say})
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
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:182

stack backtrace:
   1:     0x7f28a8488850 - sys::backtrace::write::h5b05e7b061a35107Czt
   2:     0x7f28a84aaa60 - failure::on_fail::h1e9b7e3de59488d1aPz
   3:     0x7f28a84185e0 - rt::unwind::begin_unwind_inner::h23dcfb4c37870bd62tz
   4:     0x7f28a3230460 - rt::unwind::begin_unwind::h8180555736548804672
   5:     0x7f28a3230d10 - diagnostic::Handler::bug::hfea99a1512d774b6tWF
   6:     0x7f28a67880d0 - session::Session::bug::hda4aef05452f83daiRq
   7:     0x7f28a748d1f0 - trans::meth::trans_static_method_callee::h7b45cabbb9a118b8sbz
   8:     0x7f28a748a0d0 - trans::callee::trans::h36851c362b65c790yag
   9:     0x7f28a74942f0 - trans::callee::trans_call_inner::h8685402877239769531
  10:     0x7f28a7499d10 - trans::expr::trans_rvalue_dps_unadjusted::hadddfbae4195cb641Si
  11:     0x7f28a74505f0 - trans::expr::trans_into::ha60adcbe08fa3bdbKyh
  12:     0x7f28a744f9b0 - trans::controlflow::trans_stmt_semi::hce06ed398066bc74K2d
  13:     0x7f28a7450c40 - trans::controlflow::trans_block::hdd6a1a94b7524b90B3d
  14:     0x7f28a751cc70 - trans::base::trans_closure::h1947fd5123bfe895EYt
  15:     0x7f28a743bb10 - trans::base::trans_fn::h5d061f11fc4ac1e7j9t
  16:     0x7f28a74370a0 - trans::base::trans_item::h34ec82732f0498f3Ewu
  17:     0x7f28a7524490 - trans::base::trans_crate::he5ffa45aaa619f67lsv
  18:     0x7f28a89e63c0 - driver::phase_4_translate_to_llvm::h98aea3c7bb04643bPFa
  19:     0x7f28a89c0350 - driver::compile_input::h04aea004c559b910xba
  20:     0x7f28a8a8ffe0 - monitor::unboxed_closure.22497
  21:     0x7f28a8a8fe40 - thunk::F.Invoke<A, R>::invoke::h11849311349984608396
  22:     0x7f28a8a8ebc0 - rt::unwind::try::try_fn::h13617610205470131813
  23:     0x7f28a85106c0 - rust_try_inner
  24:     0x7f28a85106b0 - rust_try
  25:     0x7f28a8a8eeb0 - thunk::F.Invoke<A, R>::invoke::h14452289732390470265
  26:     0x7f28a8498910 - sys::thread::thread_start::h93b0d38960a9fcacqrw
  27:     0x7f28a2a4e250 - start_thread
  28:     0x7f28a80ce219 - clone
  29:                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