Skip to content
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: global variable initialization done in unexpected order [1.18 backport] #52857

Closed
gopherbot opened this issue May 11, 2022 · 3 comments

Comments

@gopherbot
Copy link

@mdempsky requested issue #51913 to be considered for backport to the next 1.18 minor release.

@gopherbot Please backport to Go 1.18. This is a silent miscompilation of valid (albeit unlikely) code.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label May 11, 2022
@gopherbot gopherbot added this to the Go1.18.3 milestone May 11, 2022
@mdempsky
Copy link
Member

The issue is that https://go.dev/play/p/vyyJGI51r2w should pass, but it fails with Go 1.18 (and Go 1.17). It's a somewhat obscure case IMO (gccgo added the same broken optimization to match cmd/compile semantics actually), but it is in fact valid code.

https://go.dev/cl/395541 should backport cleanly and fixes the issue. The other package runtime CLs are not necessary for the fix.

@toothrot
Copy link
Contributor

@mdempsky Should we open a backport for Go 1.17 as well?

@dmitshur dmitshur modified the milestones: Go1.18.3, Go1.18.4 Jun 1, 2022
@heschi heschi added the CherryPickApproved Used during the release process for point releases label Jun 15, 2022
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Jun 15, 2022
@gopherbot gopherbot modified the milestones: Go1.18.4, Go1.18.5 Jul 12, 2022
@cherrymui
Copy link
Member

As we postponed the original issue #51913 to Go 1.20, maybe we don't want to backport this one? Thanks.

@cherrymui cherrymui closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2022
@cherrymui cherrymui removed the CherryPickApproved Used during the release process for point releases label Jul 27, 2022
@golang golang locked and limited conversation to collaborators Jul 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants