tools/go/loader
Alan Donovan 63c6481f3b go/loader: fix a data race
The loader was calling (*types.Checker).Files on the "unsafe" package,
a global variable.  Even with zero files, this operation is not a no-op
because it sets the package's "complete" flag, leading to a data race.
(Because Unsafe.complete is already set at construction, the
race is benign, but is reported by -race nonetheless.)

Fixes golang/go#20718

Change-Id: I5a4f95be5ab4c60ea3b6c2a7fb6f1b67acbf42bc
Reviewed-on: https://go-review.googlesource.com/46071
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-19 17:45:44 +00:00
..
testdata go/loader: improve robustness in face of input errors 2015-02-02 20:01:59 +00:00
cgo.go tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
cgo_pkgconfig.go go/loader: don't pass ldflags to cgo 2016-03-29 18:37:41 +00:00
doc.go go/loader: update comment 2016-02-22 20:28:10 +00:00
example_test.go go/loader: only run examples on 1.8 2017-02-17 19:31:53 +00:00
loader.go go/loader: fix a data race 2017-06-19 17:45:44 +00:00
loader_test.go go/loader: fix a data race 2017-06-19 17:45:44 +00:00
stdlib_test.go tools: updates for minimum Go version 1.6 2017-02-07 21:06:19 +00:00
util.go go/loader: don't treat unsafe specially wrt vendoring 2016-01-08 20:29:04 +00:00