-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
ICE when using an object-safe trait with methods marked as extern #51907
Comments
This is a regression introduced since 1.24. |
Can we bisect this down to a nightly? |
Marking as P-high, regression, but not assigning anyone till we have some better idea of the cause. |
The regression happened in By the way, we shouldn't waste time bisecting regressions, we already have @nikomatsakis...
|
@eddyb do you think you can take a look at this bug? |
Yeah this is #45225, looks like the pre-existing assumption of having the first argument split (because it's a pointer to a I'm surprised nobody hit this until now and that we have no tests for non-Rust ABIs in trait objects! |
rustc_codegen_llvm: replace the first argument early in FnType::new_vtable. Fixes #51907 by removing the vtable pointer before the `ArgType` is even created. This allows any ABI to support trait object method calls, regardless of how it passes `*dyn Trait`. r? @nikomatsakis
Do we want to backport the fix or anything? |
Well, this is pretty old, so backporting to stable is probably too much. Nominating for beta backport though. cc @rust-lang/compiler |
Please no backporting codegen changes to beta. They are likely to introduce more bugs. There's no sufficiently good reason to backport this. |
This snippet causes rustc to ICE:
rustc version: rustc 1.28.0-nightly (2a1c4ee 2018-06-25)
Error message:
The text was updated successfully, but these errors were encountered: