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
cmd/compile/internal/gc: bad store type when compiling an openshift origin package #42568
Comments
Here's smaller reproducible program:
Somehow, |
Here's some more debug output using the small reproducer above:
|
Change https://golang.org/cl/270057 mentions this issue: |
Change https://golang.org/cl/276952 mentions this issue: |
(Further comment here that I wanted to leave on the CL, but gerrit is almost completely non-functional on Firefox on mobile.) Specifically I think you should run compilecmp -fn=changed. Also, this reminds me of https://go-review.googlesource.com/c/go/+/229984. Please see Keith’s comment there. Thanks for digging to find a root cause here. |
Since CL 270057, there're many attempts to fix the expand_calls pass with interface{}-typed. But all of them did not fix the root cause. The main issue is during SSA conversion in gc/ssa.go, for empty interface case, we make its type as n.Type, instead of BytePtr. To fix these, we can just use BytePtr for now, since when itab fields are treated as scalar. No significal changes on compiler speed, size. cmd/compile/internal/ssa expandCalls.func6 9488 -> 9232 (-2.70%) file before after Δ % cmd/compile/internal/ssa.s 3992893 3992637 -256 -0.006% total 20500447 20500191 -256 -0.001% Fixes #43112 Updates #42784 Updates #42727 Updates #42568 Change-Id: I0b15d9434e0be5448453e61f98ef9c2d6cd93792 Reviewed-on: https://go-review.googlesource.com/c/go/+/276952 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
What version of Go are you using (
go version
)?This also reproduces on tip.
Does this issue reproduce with the latest release?
No, only on tip.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
git clone github.com/openshift/origin
cd pkg/templateservicebroker/servicebroker
GO111MODULE=auto go build
What did you expect to see?
Successful compilation.
What did you see instead?
Here is some prelim debugging output I've collected about what is causing this panic to trigger:
I did a little bit of digging and the problem seems to be that the compiler is not properly decomposing this store into two smaller stores for some reason. I've bisected the tree from 1.15.4 where this worked and I've found the commit that introduced this bug to be 15f01d6.
I'm happy to continue working on this and submit a fix, I've spent some time tracking this down and figured I'd at least create an issue and see if there are any obvious things to look at where things may be going wrong from folks who are more familiar with the actual SSA code than I am at the present moment.
The text was updated successfully, but these errors were encountered: