]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: profile finalizer G more carefully in goroutine profile
authorMichael Anthony Knyszek <mknyszek@google.com>
Tue, 10 May 2022 15:09:12 +0000 (15:09 +0000)
committerMichael Knyszek <mknyszek@google.com>
Tue, 10 May 2022 15:43:40 +0000 (15:43 +0000)
commit8fdd277fe6ee1770b12650a4bc2bc257e49c8065
tree3237ece858a71e3ea4fbaab932ffde177bea5acc
parentdd7d9b773f0c1319955eee0857e07dd411628e00
runtime: profile finalizer G more carefully in goroutine profile

If SetFinalizer is never called, we might readgstatus on a nil fing
variable, resulting in a crash. This change guards code that accesses
fing by a nil check.

Fixes #52821.

Change-Id: I3e8e7004f97f073dc622e801a1d37003ea153a29
Reviewed-on: https://go-review.googlesource.com/c/go/+/405475
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Rhys Hiltner <rhys@justin.tv>
src/runtime/mprof.go