-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Internal compiler error: broken MIR in gecko_bindings #42042
Comments
cc @rust-lang/compiler |
I tried 1.19.0-nightly, but we hit #41620 before we get to this part of the build. I'll see if I can reduce a test case later today. |
Are the errors legitimate? i.e. is this just a case of ICE-on-error? |
I don't know, actually. It's complaining about non-static size computing an array offset, but earlier accesses with a static offsets are accepted, which seems bogus to me. i.e. |
cc @arielb1 Does this look like a bug you fixed on nightly and hasn't been backported yet? |
That bug only looked like it affected failed compilations, but some variant might be affecting running ones. |
I've extracted enough of the relevant code to build a testcase. This compiles on 1.17-stable and 1.19-nightly, but generates a warning and then an ICE in 1.18.0-beta.2. It can probably be reduced further, but the issue was in a large collection of generated bindings and custom glue for a large C++ library, and this as least demonstrates the problem without having to build firefox. |
Minimized: struct C([S; 1]);
impl std::ops::Deref for C {
type Target = [S];
fn deref<'a>(&'a self) -> &'a [S] { &self.0 }
}
impl std::ops::DerefMut for C {
fn deref_mut<'a>(&'a mut self) -> &'a mut [S] { &mut self.0 }
}
struct S {}
impl S {
fn foo(&mut self) {}
}
fn main() {
let mut c = C([S {}]);
c[0*0].foo();
} Same properties as the example by @rillian above: it compiles on stable and nightly, but gives an error and ICE on beta. |
Yeah. Let's see whether it is fixed after backporting before we close it. |
Oh seems I've misunderstood the mechanism. We need to wait for a new version bump of the beta, which will happen in PR #42161. |
The PR is merged. I can confirm that the minimized example I posted above is fixed on latest beta |
@rillian Could you check if we can compile fine on beta today? |
1.18.0-beta.3 resolves the issue on my local machine. I'm waiting for ci tests to confirm other platforms. |
The Window 2012 x64 job is having unrelated issues, but otherwise the try push was green, so I think this is resolved for us too. Thanks again for your help! https://treeherder.mozilla.org/#/jobs?repo=try&revision=db2dda574de48fd4c176b9caa7e08e2135f3cf06 |
Rust 1.18.0-beta.2 (f4e8e81 2017-05-11) fails to compile some stylo code in Firefox:
This is yesterday's firefox master with --enable-stylo.
See https://treeherder.mozilla.org/#/jobs?repo=try&revision=86ebd4aa3836&selectedJob=99289427 for a full build example.
The text was updated successfully, but these errors were encountered: