Commit f871472
committed
internal/lsp/cache: lock in snapshot.knownFilesInDir
We were not locking while iterating s.files in snapshot.knownFilesInDir.
All other accesses of s.files appear to be locked, so this should fix
golang/go#43972.
Fixes golang/go#43972
Change-Id: I01184c3992c91f8beb4a3239f70cc4487a528ec0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/287573
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>1 parent c2bea79 commit f871472
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
718 | 717 | | |
719 | 718 | | |
720 | 719 | | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
721 | 723 | | |
722 | 724 | | |
723 | 725 | | |
| |||
1010 | 1012 | | |
1011 | 1013 | | |
1012 | 1014 | | |
1013 | | - | |
| 1015 | + | |
1014 | 1016 | | |
1015 | 1017 | | |
1016 | 1018 | | |
| |||
0 commit comments