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

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

Example failure:

Copy link

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

The builders are now passing with the above CL.

@golang golang locked and limited conversation to collaborators Feb 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

3 participants