mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
f98dd29910
commit
52fea4b3d9
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue