Skip to content
Snippets Groups Projects
Commit a0d15cb9 authored by Felix Geisendörfer's avatar Felix Geisendörfer Committed by Michael Pratt
Browse files

[release-branch.go1.23] runtime: fix MutexProfile missing root frames

Fix a regression introduced in CL 598515 causing runtime.MutexProfile
stack traces to omit their root frames.

In most cases this was merely causing the `runtime.goexit` frame to go
missing. But in the case of runtime._LostContendedRuntimeLock, an empty
stack trace was being produced.

Add a test that catches this regression by checking for a stack trace
with the `runtime.goexit` frame.

Also fix a separate problem in expandFrame that could cause
out-of-bounds panics when profstackdepth is set to a value below 32.
There is no test for this fix because profstackdepth can't be changed at
runtime right now.

Fixes #69865

Change-Id: I1600fe62548ea84981df0916d25072c3ddf1ea1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/611615


Reviewed-by: default avatarDavid Chase <drchase@google.com>
Reviewed-by: default avatarNick Ripley <nick.ripley@datadoghq.com>
Reviewed-by: default avatarMichael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit c64ca8c6)
Reviewed-on: https://go-review.googlesource.com/c/go/+/621276


Reviewed-by: default avatarCherry Mui <cherryyz@google.com>
parent 958f3a03
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment