1
0
mirror of https://github.com/golang/go synced 2024-11-18 21:14:44 -07:00
go/internal/imports
Ariel Mashraki 1f7a813c0d 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>
2019-10-18 18:31:53 +00:00
..
testdata/mod imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
fix_test.go tools/internal/imports: fix data race in packageInfo 2019-10-18 18:31:53 +00:00
fix.go tools/internal/imports: fix data race in packageInfo 2019-10-18 18:31:53 +00:00
imports_test.go all: skip more memory-intensive tests on linux-arm 2019-08-30 17:05:41 +00:00
imports.go internal/imports: get candidate imports 2019-08-16 16:26:37 +00:00
mkindex.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
mkstdlib.go internal/imports: add all interfaces in mkstdlib 2019-09-10 20:25:02 +00:00
mod_112_test.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
mod_cache_test.go internal/imports: skip scanned module cache dirs 2019-08-29 21:03:13 +00:00
mod_cache.go internal/imports: skip scanned module cache dirs 2019-08-29 21:03:13 +00:00
mod_test.go internal/imports: skip TestModeGetmodeVendor 2019-10-10 17:12:13 +00:00
mod.go internal/imports: don't prefix stdlib package with std/ 2019-09-18 19:29:07 +00:00
proxy_112_test.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
proxy_113_test.go imports: rename to internal/imports 2019-05-20 21:49:35 +00:00
sortimports.go internal/imports: merge import declarations 2019-08-14 23:54:02 +00:00
zstdlib.go internal/imports: add all interfaces in mkstdlib 2019-09-10 20:25:02 +00:00