x/tools/internal/imports: data-race causes panic due to concurrent map read and write #34895
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
When running
imports.Process
concurrently, the program panics with a fatal error due to concurrent map iterations and map writes.I've created a CL that fixes this - https://go-review.googlesource.com/c/tools/+/200865 (so, I'm not sure this Github issue is really needed?)
This can be reproduced as follows:
main.go
testdata/first.go
testdata/second.go
Output:
The text was updated successfully, but these errors were encountered: