Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/internal/imports: fix data race in packageInfo
Before this commit, when running imports.Process concurrently, the program panics with a fatal error due to concurrent map iterations and map writes. This CL fixes this by adding a copy of the map to the packageInfo structure. Fixed #34895 Change-Id: If009e6108813f86495c7e20e69739186b8b236d7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/200865 Run-TryBot: Heschi Kreinick <heschi@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com>
- Loading branch information
Showing
2 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters