mirror of
https://github.com/golang/go
synced 2024-10-01 05:28:33 -06:00
db903f390e
The invalidateContent function does not acquire a snapshot's mutex to avoid blocking other work (even though it probably should since it's only called after a context is canceled). A case was added to iterate through files when a file is created, and it did not respect the fact that the snapshot's mutex was not locked, resulting in a concurrent map read and write. This change makes sure that the access of the snapshot's files map is guarded by a mutex. As a follow-up, we should just acquire snapshot.mu in invalidateContent. Updates golang/go#36006 Change-Id: Idd904ae582055ce786062df50875ac7f0896fd1c Reviewed-on: https://go-review.googlesource.com/c/tools/+/210199 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> |
||
---|---|---|
.. | ||
apidiff | ||
fastwalk | ||
gopathwalk | ||
imports | ||
jsonrpc2 | ||
lsp | ||
memoize | ||
module | ||
semver | ||
span | ||
telemetry | ||
testenv | ||
tool | ||
xcontext |