Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upInternal compiler error: broken MIR in gecko_bindings #42042
Comments
This comment has been minimized.
This comment has been minimized.
alexcrichton
added
regression-from-stable-to-beta
T-compiler
labels
May 16, 2017
aturon
added
the
I-nominated
label
May 16, 2017
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
Are the errors legitimate? i.e. is this just a case of ICE-on-error? |
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
cc @arielb1 Does this look like a bug you fixed on nightly and hasn't been backported yet? |
This comment has been minimized.
This comment has been minimized.
|
That bug only looked like it affected failed compilations, but some variant might be affecting running ones. |
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Yeah. Let's see whether it is fixed after backporting before we close it. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
The PR is merged. I can confirm that the minimized example I posted above is fixed on latest beta |
This comment has been minimized.
This comment has been minimized.
|
@rillian Could you check if we can compile fine on beta today? |
This comment has been minimized.
This comment has been minimized.
|
1.18.0-beta.3 resolves the issue on my local machine. I'm waiting for ci tests to confirm other platforms. |
This comment has been minimized.
This comment has been minimized.
|
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 |
rillian commentedMay 16, 2017
•
edited
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.