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

findleyr opened this issue Feb 19, 2021 · 2 comments

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

findleyr opened this issue Feb 19, 2021 · 2 comments


Copy link

@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:

Copy link

@gopherbot gopherbot commented Feb 19, 2021

Change mentions this issue: go/types: don't write during sanitizeInfo if nothing has changed


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

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
Trust: Robert Findley <>
Trust: Robert Griesemer <>
Run-TryBot: Robert Findley <>
Reviewed-by: Robert Griesemer <>
TryBot-Result: Go Bot <>
Copy link
Contributor Author

@findleyr findleyr commented Feb 20, 2021

The builders are now passing with the above CL.


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

Successfully merging a pull request may close this issue.

None yet
3 participants