Skip to content

Commit 773b2e3

Browse files
committed
internal/crashmonitor: clarify pre-go1.23 behavior
The current comment implies that traceback includes PCs for inlined frames in 1.23, which is not the case. For golang/go#70637. Change-Id: I26fe4328843733d230e31ccdb452d4a25ae91b3c Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/637756 Reviewed-by: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Robert Findley <[email protected]>
1 parent 738f4b2 commit 773b2e3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

internal/crashmonitor/monitor_test.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ func TestViaStderr(t *testing.T) {
8989
"runtime.goexit:--"
9090

9191
if !crashmonitor.Supported() { // !go1.23
92-
// Before go1.23, the traceback excluded PCs for inlined frames.
92+
// Traceback excludes PCs for inlined frames. Before go1.23
93+
// (https://go.dev/cl/571798 specifically), passing the set of
94+
// PCs in the traceback to runtime.CallersFrames, would report
95+
// only the innermost inlined frame and none of the inline
96+
// "callers".
97+
//
98+
// Thus, here we must drop the caller of the inlined frame.
9399
want = strings.ReplaceAll(want, "golang.org/x/telemetry/internal/crashmonitor_test.child:+2\n", "")
94100
}
95101

0 commit comments

Comments
 (0)