-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: Value live at entry #54911
Comments
This comment was marked as outdated.
This comment was marked as outdated.
The backport on that issue has milestone 1.19.1, which is the version I'm on, so either the backport is incomplete or this is a separate bug. |
This comment was marked as outdated.
This comment was marked as outdated.
Hmm, wait, I see the fix in go1.19.1: https://github.com/golang/go/commits/go1.19.1 Seems strange, on tip, it compiles ok in non-unified IR
|
So #53702 is the issue with non-generic, this is about generic. Surprisingly, https://go-review.googlesource.com/c/go/+/422196 fixes it. Should we backport that fix? cc @mdempsky @randall77 |
Yeah, I think CL 422196 is safe to backport if it fixes a regression in 1.19. |
Change https://go.dev/cl/428758 mentions this issue: |
@gopherbot please backport this to go1.19 |
Backport issue(s) opened: #54917 (for 1.19). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
@gopherbot please backport this to go1.18 |
Ack. You're the owner of that CL, so please backport it when you have time 👍 |
So this issue affects both Go 1.18 and 1.19, including all of their point releases. So this isn't a regression per se; it's functionality that's never worked. However, the underlying issue isn't generics specific. It was a latent issue in packages ir and inline, and merely exposed when the generics frontend started using ir.InitExpr to add init statements to OCLOSURE nodes to support certain generic expressions. Theoretically, the issue here could lead to silent miscompilation of non-generics code. But looking at how we use ir.InitExpr in Go 1.18 and 1.19, it doesn't look like that can actually happen. I believe the only way the failure can manifest is as ICEs affecting generics code like reported in this issue. Finally, the "no backports to Go 1.18 generics" policy is really about noder/stencil.go. That file is not really well understood by current team members, and attempts to fix issues in it have repeatedly introduced new issues. Those concerns don't apply here. I'm weakly leaning towards backporting to both Go 1.18 and 1.19. I think the fix is safe and has real benefit to users; but I also don't think that's essential if we want to be conservative. |
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?
https://go.dev/play/p/LgwHMT5v_EV
What did you expect to see?
Compile without error.
What did you see instead?
The text was updated successfully, but these errors were encountered: