-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
cmd/compile: internal compiler error: weird package in name: p.a => a from "test/p", not "" #51423
Comments
This seems to me a problem with FWIW, the non-generic version works well, and also unified IR code. |
I'm not sure entirely what is going on here yet. Might have something to do with function values. if you replace the body of
Then it works. |
Ping. This is marked as a release-blocker and we're very close to the release. Do we understand the underlying issue yet? Given that this causes an ICE instead of mis-compilation, should it be a release-blocker at this point? |
I think this is a release-blocker, since when it's an ICE on valid code. |
Also cc @danscales |
Change https://go.dev/cl/391574 mentions this issue: |
I'm trying a different approach to this, but thus far lack success. The problem appears to be that "wrong" names are left on a closure signature on an Inl.Body, but those names are probably unimportant. Therefore, when constructing an Inl.Body, strip them out from an OCLOSURE node (which is what causes the problem here) to disappear the problem. Unfortunately, that doesn't seem to work, not sure why, and it also causes a single inscrutable failure in |
Reopening for backport to 1.18 release branch. |
Change https://go.dev/cl/391774 mentions this issue: |
For hidden closure built during stenciling to implement a function instantiation, the function may come from other package, not local package, which causes the ICE for code that re-export the hidden closure after inlining. To fix it, use the closure package for export writer when writing out the closure itself. Fixes #51423 Change-Id: I23b067ba14e2d602a0fc3b2e99bd9317afbe53ff Reviewed-on: https://go-review.googlesource.com/c/go/+/391574 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit 9743e9b) Reviewed-on: https://go-review.googlesource.com/c/go/+/391774 Trust: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Closed by merging commit 4b9b25a (CL 391774) to release-branch.go1.18. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go compiler panicked with generics code, i made a reproduce demo at: https://go.dev/play/p/F8oOkWnPvfG?v=gotip
and the error logs:
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: