From bce7aec3cdca8580585095007e9b7cea11a8812f Mon Sep 17 00:00:00 2001 From: Philip Silva Date: Tue, 30 May 2023 19:59:43 +0200 Subject: [PATCH] runtime/trace: disable frame pointer unwinding on plan9 Fixes #60254 Change-Id: Ifd9e517a9479e5cd63fd3622b2556989d5f84eb9 Reviewed-on: https://go-review.googlesource.com/c/go/+/499036 Reviewed-by: Austin Clements Reviewed-by: Keith Randall Reviewed-by: Keith Randall Run-TryBot: Keith Randall TryBot-Bypass: Keith Randall --- src/runtime/trace.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/trace.go b/src/runtime/trace.go index 2f9e141b09..ac80ca2902 100644 --- a/src/runtime/trace.go +++ b/src/runtime/trace.go @@ -15,6 +15,7 @@ package runtime import ( "internal/abi" "internal/goarch" + "internal/goos" "runtime/internal/atomic" "runtime/internal/sys" "unsafe" @@ -993,8 +994,9 @@ func traceStackID(mp *m, pcBuf []uintptr, skip int) uint64 { // tracefpunwindoff returns true if frame pointer unwinding for the tracer is // disabled via GODEBUG or not supported by the architecture. +// TODO(#60254): support frame pointer unwinding on plan9/amd64. func tracefpunwindoff() bool { - return debug.tracefpunwindoff != 0 || (goarch.ArchFamily != goarch.AMD64 && goarch.ArchFamily != goarch.ARM64) + return debug.tracefpunwindoff != 0 || (goarch.ArchFamily != goarch.AMD64 && goarch.ArchFamily != goarch.ARM64) || goos.IsPlan9 == 1 } // fpTracebackPCs populates pcBuf with the return addresses for each frame and -- 2.50.0