1
0
mirror of https://github.com/golang/go synced 2024-09-30 20:18:33 -06:00

internal/memoize: add a go:nocheckptr annotation to (*Store).get

Fixes golang/go#35125

Change-Id: I08251b94a44fbc2324f6edc883d9d687b45a00b0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/203078
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Brad Fitzpatrick 2019-10-24 04:25:51 +00:00
parent 2b779830f9
commit 7b6f5d95f3

View File

@ -121,6 +121,8 @@ func (s *Store) Cached(key interface{}) interface{} {
return h.Cached()
}
//go:nocheckptr
// nocheckptr because: https://github.com/golang/go/issues/35125#issuecomment-545671062
func (s *Store) get(key interface{}) *Handle {
// this must be called with the store mutex already held
e, found := s.entries[key]