]> Cypherpunks repositories - gostls13.git/commit
go/token: clear cache after grabbing the mutex in RemoveFile
authorMateusz Poliwczak <mpoliwczak34@gmail.com>
Mon, 22 Sep 2025 08:54:29 +0000 (10:54 +0200)
committerMateusz Poliwczak <mpoliwczak34@gmail.com>
Tue, 23 Sep 2025 18:49:50 +0000 (11:49 -0700)
commit902dc27ae9b0670cc35ca972dfe1a5f45b66eb9e
tree7b732044898c6da578a05c570fd6b86e90e3e255
parenta13d085a5b66e4d9f3ecfae91c40f62034cfb481
go/token: clear cache after grabbing the mutex in RemoveFile

This fixes a race, that was possible to hit in RemoveFile.
The file cache could have been populated concurrently just before
grabbing of the mutex.

Change-Id: I6a6a696452d8bd79ac4ac6574297390978353444
Reviewed-on: https://go-review.googlesource.com/c/go/+/705756
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
src/go/token/position.go
src/go/token/position_test.go