aboutsummaryrefslogtreecommitdiff
path: root/src/internal/godebug
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2023-02-23 22:22:29 +0000
committerGopher Robot <gobot@golang.org>2023-02-23 23:09:10 +0000
commit52fea4b3d97f741162a38e007aa7cdb5aaf52722 (patch)
treecf5178a46b2f78986962d19867b89e5b9aeb7f26 /src/internal/godebug
parentf98dd299103f66b86bbef402a63a0c6f8fc8b11e (diff)
downloadgo-52fea4b3d97f741162a38e007aa7cdb5aaf52722.tar.xz
runtime: fix linkname signature for godebug
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>
Diffstat (limited to 'src/internal/godebug')
-rw-r--r--src/internal/godebug/godebug.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/internal/godebug/godebug.go b/src/internal/godebug/godebug.go
index 443868c384..fc6fcb92e2 100644
--- a/src/internal/godebug/godebug.go
+++ b/src/internal/godebug/godebug.go
@@ -45,7 +45,7 @@ type Setting struct {
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.
@@ -145,7 +145,7 @@ func setUpdate(update func(string, string))
// 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