This signature uses the wrong type for the passed function, which
will be saved in the internal runtime map. Since the functions are
likely compatible (uint64 return versus int64), this may work but
should generally be fixed.
This is other instance of #58440.
Change-Id: Ied82e554745ef72eefeb5be540605809ffa06533
Reviewed-on: https://go-review.googlesource.com/c/go/+/470915
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Michael Pratt <mpratt@google.com>
type setting struct {
value atomic.Pointer[string]
nonDefaultOnce sync.Once
- nonDefault atomic.Int64
+ nonDefault atomic.Uint64
}
// New returns a new Setting for the $GODEBUG setting with the given name.
// It forwards registrations to runtime/metrics.
//
//go:linkname registerMetric
-func registerMetric(name string, read func() int64)
+func registerMetric(name string, read func() uint64)
// setNewNonDefaultInc is provided by package runtime.
// The runtime can do