diff options
| author | Russ Cox <rsc@golang.org> | 2024-05-22 17:09:02 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2024-05-29 16:25:21 +0000 |
| commit | 9a8995b8b6a08d5fe01122771f962b36336f8aec (patch) | |
| tree | 0222395807dfced049e2602280a7f8614b2addbe /src/runtime/traceback.go | |
| parent | a3a584e4abad776f4b8e5cab5b5923724fdf75d9 (diff) | |
| download | go-9a8995b8b6a08d5fe01122771f962b36336f8aec.tar.xz | |
all: document legacy //go:linkname for modules with ≥100 dependents
For #67401.
Change-Id: I015408a3f437c1733d97160ef2fb5da6d4efcc5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/587598
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/traceback.go')
| -rw-r--r-- | src/runtime/traceback.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go index ebee16c6a7..03c02f7771 100644 --- a/src/runtime/traceback.go +++ b/src/runtime/traceback.go @@ -1079,6 +1079,16 @@ func printAncestorTracebackFuncInfo(f funcInfo, pc uintptr) { print("\n") } +// callers should be an internal detail, +// (and is almost identical to Callers), +// but widely used packages access it using linkname. +// Notable members of the hall of shame include: +// - github.com/phuslu/log +// +// Do not remove or change the type signature. +// See go.dev/issue/67401. +// +//go:linkname callers func callers(skip int, pcbuf []uintptr) int { sp := getcallersp() pc := getcallerpc() |
