-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: internal compiler error: devirtualization failed (x/text, x/build, protobuf) #42279
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
Comments
Thanks, on it. |
Change https://golang.org/cl/266359 mentions this issue: |
Confusingly, golang.org/x/text@v0.3.3/encoding/encoding.go at line 293 isn't even what the error reports, its an var ErrInvalidUTF8 = errors.New("encoding: invalid UTF-8") |
In case more test cases helps
that's github.com/golang/protobuf v1.4.2 |
Yeah, I noticed that too. I think that's an artifact of |
Looks like both of the reported failure cases are because of a struct type having a promoted method from an embedded interface-typed field. So we can't fully devirtualize those calls, but we can still improve them somewhat. |
We should still be able to devirtualize here, but I need to understand the AST better. While I'm doing that, at least switch to a graceful failure case (i.e., skip the optimization and print a warning message) to fix the x/text builders. Updates #42279. Change-Id: Ie2b0b701fccf590d0cabfead703fc2fa999072cf Reviewed-on: https://go-review.googlesource.com/c/go/+/266359 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Change https://golang.org/cl/266300 mentions this issue: |
Two more data points from x/build:
From https://build.golang.org/?repo=golang.org%2fx%2fbuild for Go commit 5cc43c5. (Other Go commits look okay.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
On tip, yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Ran
gotip test
in my project to check for performance changes from the new inlining/devirtualization changes.I don't think I need to provide the exact code; the error message shows which files in my module cache are failing to be built.
I'm guessing a build dashboard will reveal this, I'm just probably too quick to test changes I'm excited to see...
What did you expect to see?
A build success.
What did you see instead?
An ICE:
cc @mdempsky
The text was updated successfully, but these errors were encountered: