From: Michael Anthony Knyszek Date: Sat, 17 Sep 2022 02:21:12 +0000 (+0000) Subject: runtime/internal/sys: make Len64 nosplit X-Git-Tag: go1.20rc1~1009 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=cc1b20e8adf83865a1dbffa259c7a04ef0699b43;p=gostls13.git runtime/internal/sys: make Len64 nosplit CL 427615 causes failures when Len64 can't be inlined. It's unclear to me why this wasn't a problem before, but it is used in sensitive contexts and therefore really should be marked. Confirmed that the failures in question reproduce without this change, and don't reproduce with it. Fixes #55117. Change-Id: Ic3aa96af1420cc0c39551908d83f954725c712f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/431058 Reviewed-by: Cherry Mui Run-TryBot: Michael Knyszek Auto-Submit: Michael Knyszek TryBot-Result: Gopher Robot --- diff --git a/src/runtime/internal/sys/intrinsics_common.go b/src/runtime/internal/sys/intrinsics_common.go index 48d9759ca9..7d7af20906 100644 --- a/src/runtime/internal/sys/intrinsics_common.go +++ b/src/runtime/internal/sys/intrinsics_common.go @@ -45,6 +45,10 @@ var ntz8tab = [256]uint8{ } // len64 returns the minimum number of bits required to represent x; the result is 0 for x == 0. +// +// nosplit because this is used in src/runtime/histogram.go, which make run in sensitive contexts. +// +//go:nosplit func Len64(x uint64) (n int) { if x >= 1<<32 { x >>= 32