diff options
| author | Keith Randall <khr@golang.org> | 2023-07-03 13:16:59 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2023-07-04 16:54:39 +0000 |
| commit | e126572f8a91d42b86242012012d0cad4507dca8 (patch) | |
| tree | 4bde9ae2427a987ce1e4419097c68a5141a1ed7c /src/runtime/traceback.go | |
| parent | e4ed92a355cebc399dc34d33a556f656fa5c7690 (diff) | |
| download | go-e126572f8a91d42b86242012012d0cad4507dca8.tar.xz | |
runtime: have ReadMemStats do a nil check before switching stacks
This gives the user a better stack trace experience. No need to
expose them to runtime.systemstack and friends.
Fixes #61158
Change-Id: I4f423f82e54b062773067c0ae64622e37cb3948b
Reviewed-on: https://go-review.googlesource.com/c/go/+/507755
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'src/runtime/traceback.go')
| -rw-r--r-- | src/runtime/traceback.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go index d6f89210a4..86df1155b5 100644 --- a/src/runtime/traceback.go +++ b/src/runtime/traceback.go @@ -1147,6 +1147,7 @@ func showfuncinfo(sf srcFunc, firstFrame bool, calleeID abi.FuncID) bool { // isExportedRuntime reports whether name is an exported runtime function. // It is only for runtime functions, so ASCII A-Z is fine. +// TODO: this handles exported functions but not exported methods. func isExportedRuntime(name string) bool { const n = len("runtime.") return len(name) > n && name[:n] == "runtime." && 'A' <= name[n] && name[n] <= 'Z' |
