commit | fd6a59f26da9610ac117c45edf75c3163f95b0f1 | [log] [tgz] |
---|---|---|
author | Rebecca Stambler <rstambler@golang.org> | Thu Sep 05 16:29:59 2019 -0400 |
committer | Rebecca Stambler <rstambler@golang.org> | Thu Sep 05 20:58:25 2019 +0000 |
tree | b9f90b1f7175ea80ecaf488e17f3e853c761e6ae | |
parent | 6b3d1c9ba8bf7ce410f6b490852ec54953383362 [diff] |
internal/lsp/cache: fix race condition in type-checking We had previously been returning the metadata map in a few of the loading functions. We don't actually need the map; we only need the actual metadata. The race was caused by the return of the f.meta field in a few functions, unprotected by the f.mu lock. This was likely a result of the f.mu lock being added after the fact. Fixes golang/go#33978 Change-Id: Ice5778d9d6dea23304237baf321b55d4fee6599c Reviewed-on: https://go-review.googlesource.com/c/tools/+/193717 Reviewed-by: Ian Cottrell <iancottrell@google.com> Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This subrepository holds the source for various packages and tools that support the Go programming language.
Some of the tools, godoc
and vet
for example, are included in binary Go distributions.
Others, including the Go guru
and the test coverage tool, can be fetched with go get
.
Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs.
The easiest way to install is to run go get -u golang.org/x/tools/...
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/tools
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the tools repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/tools/(your subdir):” in the subject line, so it is easy to find.