Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static call to invalid vtable #20676

Closed
alexcrichton opened this issue Jan 7, 2015 · 10 comments · Fixed by #21089
Closed

static call to invalid vtable #20676

alexcrichton opened this issue Jan 7, 2015 · 10 comments · Fixed by #21089
Assignees
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority
Milestone

Comments

@alexcrichton
Copy link
Member

Discovered this ICE in the rollup that I'm preparing:

fn main() {
    let a: &fmt::Show = &1i;     
    format!("{:?}", a);
}
error: internal compiler error: static call to invalid vtable: VtableObject(VtableObject(object_ty=core::fmt::Show + 'static))
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/alex/code/rust2/src/libsyntax/diagnostic.rs:182
@alexcrichton alexcrichton added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 7, 2015
@mzabaluev
Copy link
Contributor

In Grust, I tried to change this line to:

        AsyncClosure::invoke(self.closure, args)

The crate compiles without an issue, but compiling another crate where this is used results in an ICE that looks to be this one.

@nikomatsakis
Copy link
Contributor

Looks like I missed a case in #20341

@nikomatsakis
Copy link
Contributor

Nominating for 1.0 beta.

@shepmaster
Copy link
Member

Are there any known workarounds for this problem? I ran into this in a hard way trying to update to the newest nightlies.

zmbush added a commit to zmbush/megaprompt that referenced this issue Jan 12, 2015
@nikomatsakis
Copy link
Contributor

@shepmaster not sure, I'll try to get a PR up today

@nikomatsakis
Copy link
Contributor

@shepmaster a new type wrapper around the Show object would probably work, ping me on irc (nmatsakis) for more details

@outersky
Copy link

I just wanna run iron example on MAC 10.10 with rust-nightly, the same error occurs, I don't know if it's of the same case:

error: internal compiler error: static call to invalid vtable: VtableObject(VtableObject(object_ty=error::Error + 'static))

@barosl
Copy link
Contributor

barosl commented Jan 13, 2015

This is also blocking Iron, which itself compiles well, but using the iron crate fails:

error: internal compiler error: static call to invalid vtable: VtableObject(VtableObject(object_ty=error::Error + 'static))

   7:     0x7f6f80c991f0 - trans::meth::trans_static_method_callee::h7b45cabbb9a118b8sbz
   8:     0x7f6f80c960d0 - trans::callee::trans::h36851c362b65c790yag
   9:     0x7f6f80ca02f0 - trans::callee::trans_call_inner::h8685402877239769531
  10:     0x7f6f80ca5d10 - trans::expr::trans_rvalue_dps_unadjusted::hadddfbae4195cb641Si
  11:     0x7f6f80c5c5f0 - trans::expr::trans_into::ha60adcbe08fa3bdbKyh

@nikomatsakis
Copy link
Contributor

Fix in #21089, sorry for the delay.

@shepmaster
Copy link
Member

@nikomatsakis thanks for the work! I pulled your PR and built with it, and my code compiles again. Hooray!

@brson brson added P-medium Medium priority and removed I-nominated labels Jan 15, 2015
@brson brson added this to the 1.0 beta milestone Jan 15, 2015
alexcrichton added a commit to alexcrichton/rust that referenced this issue Jan 15, 2015
…ble-for-object

Support UFCS style calls to a method defined in `Trait` where `Self` is bound to a trait object. Fixes rust-lang#20676.

r? @alexcrichton
richo added a commit to richo/rust that referenced this issue Apr 9, 2015
richo added a commit to richo/rust that referenced this issue Apr 9, 2015
richo added a commit to richo/rust that referenced this issue Apr 9, 2015
richo added a commit to richo/rust that referenced this issue Apr 9, 2015
richo added a commit to richo/rust that referenced this issue Apr 10, 2015
richo added a commit to richo/rust that referenced this issue Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants