Skip to content

Commit

Permalink
internal/memoize: add a go:nocheckptr annotation to (*Store).get
Browse files Browse the repository at this point in the history
Fixes golang/go#35125

Change-Id: I08251b94a44fbc2324f6edc883d9d687b45a00b0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/203078
Run-TryBot: Brad Fitzpatrick <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Matthew Dempsky <[email protected]>
  • Loading branch information
bradfitz committed Oct 24, 2019
1 parent 2b77983 commit 7b6f5d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/memoize/memoize.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 7b6f5d9

Please sign in to comment.