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

go/types: data race in representableConst in Go 1.13 and earlier [1.12 backport] #36688

Closed
gopherbot opened this issue Jan 22, 2020 · 3 comments

Comments

@gopherbot
Copy link

@matloob requested issue #36687 to be considered for backport to the next 1.12 minor release.

@gopherbot backport please 1.12 1.13

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jan 22, 2020
@gopherbot gopherbot added this to the Go1.12.16 milestone Jan 22, 2020
@toothrot
Copy link
Contributor

@matloob Could you please include a short rationale for the backport, in accordance with https://golang.org/wiki/MinorReleases?

@matloob
Copy link
Contributor

matloob commented Jan 22, 2020

Including the rationale from the original change. go/types and go/packages (through the go/types dependency) will have a race in 1.12 without this fix.

The race in go/packages reported in #31749 was fixed at tip, but is still an issue for Go 1.13 and earlier, and is showing up in the go/packages race failure reported in #36605.

That race is caused by a race in go/types which in turn is caused by go/constant.Float64Val() calling Rat.Float64 in math/big, which has a race reported in #34919 , and subsequently fixed in tip.

Fixing this race in go/types on Go 1.13 and earlier requires backporting CL 201205 to those releases. (Alternatively, we could fix the race by adding a workaround in go/constant or go/types, but that would be more work). I'm not sure if fixing this is worth a backport but we might as well have the discussion. If we decide not to go with the backport, we'll have to accept a race in go/packages and disable some of its tests in race mode in Go 1.13 and earlier.

@dmitshur dmitshur modified the milestones: Go1.12.16, Go1.12.17 Jan 27, 2020
@toothrot toothrot modified the milestones: Go1.12.17, Go1.12.18 Feb 12, 2020
@dmitshur
Copy link
Contributor

Go 1.14 has been released, so there will not be more Go 1.12.x releases per the release policy. I'll close this issue so that it doesn't get in the way when searching for other issues in CherryPickCandidate state.

@dmitshur dmitshur removed the CherryPickCandidate Used during the release process for point releases label Feb 26, 2020
@golang golang locked and limited conversation to collaborators Feb 25, 2021
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

4 participants