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 x/tools -race builders #44434

Closed
findleyr opened this issue Feb 19, 2021 · 2 comments
Closed

go/types: data race in x/tools -race builders #44434

findleyr opened this issue Feb 19, 2021 · 2 comments
Assignees

Comments

@findleyr
Copy link
Contributor

@findleyr findleyr commented Feb 19, 2021

Following the dev.typeparams merge, we're getting failures in the -race builders on the x/tools repo.

Example failure:
https://build.golang.org/log/0dadc226267fa2479b9ae1d5e5f8c567ccfb565a

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 19, 2021

Change https://golang.org/cl/294411 mentions this issue: go/types: don't write during sanitizeInfo if nothing has changed

Loading

gopherbot pushed a commit that referenced this issue Feb 19, 2021
In its final phase, the typechecker walks the types it produces to
ensure that no unexpanded type instances leak through the API. However,
this also walks shared types (such as those in the universe scope),
resulting in a potential data race during concurrent typechecking
passes.

Fix this by being careful not to write if nothing needs to be changed.
Since any shared types should already be sanitized, this should
eliminate data races.

For #44434

Change-Id: Iadb2e78863efe0e974e69a00e255f26cfaf9386a
Reviewed-on: https://go-review.googlesource.com/c/go/+/294411
Trust: Robert Findley <rfindley@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
@findleyr
Copy link
Contributor Author

@findleyr findleyr commented Feb 20, 2021

The builders are now passing with the above CL.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants