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: init info of OAS node in a select case is being dropped [1.17 backport] #49511

Closed
gopherbot opened this issue Nov 10, 2021 · 2 comments
Closed
Labels
CherryPickApproved
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Nov 10, 2021

@rhysh requested issue #48289 to be considered for backport to the next 1.17 minor release.

The problem this fixes was introduced by 0328c3b. It affects the Go 1.17 series, including go1.17.3.

$ ./bin/go version && ./bin/go run ~/issue48289.go
go version go1.16.10 linux/amd64

$ ./bin/go version && ./bin/go run ~/issue48289.go
go version go1.17.3 linux/amd64
FAIL: 1 != 0

$ ./bin/go version && ./bin/go run ~/issue48289.go
go version devel +88e1415d08 Thu Dec 17 04:43:59 2020 +0000 linux/amd64

$ ./bin/go version && ./bin/go run ~/issue48289.go
go version devel +0328c3b660 Thu Dec 17 15:50:38 2020 +0000 linux/amd64
FAIL: 1 != 0

@gopherbot please consider this for backport to 1.17

@gopherbot gopherbot added the CherryPickCandidate label Nov 10, 2021
@gopherbot gopherbot added this to the Go1.17.4 milestone Nov 10, 2021
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Nov 13, 2021

Change https://golang.org/cl/363664 mentions this issue: [release-branch.go1.17] cmd/compile: fix case where init info of OAS node is dropped

@heschi heschi added the CherryPickApproved label Nov 24, 2021
@gopherbot gopherbot removed the CherryPickCandidate label Nov 24, 2021
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Nov 24, 2021

Closed by merging 4eaf0b7 to release-branch.go1.17.

gopherbot pushed a commit that referenced this issue Nov 24, 2021
…node is dropped

When an OAS node is converted to an OSELRECV2 node in tcSelect(), the
possible DCL node in the Init field was being dropped, since a
completely new node was being created and the Init field was not set. I
don't expect n.Init() to be set for the ORECV case, but the code now
deals with that too.

Fixed bug in both tcSelect() and transformSelect().

Cherry-picked from https://go-review.googlesource.com/c/go/+/348569

Fixes #49511

Change-Id: Id5b736daa8e90afda88aaa3769dde801db294c0d
Reviewed-on: https://go-review.googlesource.com/c/go/+/363664
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved
Projects
None yet
Development

No branches or pull requests

2 participants