]> Cypherpunks repositories - gostls13.git/commit
runtime: uphold goroutine profile invariants in coroswitch
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 23 Oct 2024 16:28:52 +0000 (16:28 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 24 Oct 2024 17:09:10 +0000 (17:09 +0000)
commit2a98a1849f059ffa94ab23a1ab7d8fa0fd0b48dd
tree073fc15eb15188766d8a5885fcfc50590df84cf2
parentfb2a7f8ce1b1abf1195ba61e40286985f1189fa8
runtime: uphold goroutine profile invariants in coroswitch

Goroutine profiles require checking in with the profiler before any
goroutine starts running. coroswitch is a place where a goroutine may
start running, but where we do not check in with the profiler, which
leads to crashes. Fix this by checking in with the profiler the same way
execute does.

Fixes #69998.

Change-Id: Idef6dd31b70a73dd1c967b56c307c7a46a26ba73
Reviewed-on: https://go-review.googlesource.com/c/go/+/622016
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/coro.go
src/runtime/pprof/pprof_test.go