]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.23] 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 Pratt <mpratt@google.com>
Wed, 30 Oct 2024 16:49:25 +0000 (16:49 +0000)
commitcfe0ae0b7070048ceda021988b01fbc6a8589a1b
tree84d63f5b626acc3e4e424a0711c0711ad5459f03
parent58babf6e0bf58cd81bb5a71744a1c195fba2d6c8
[release-branch.go1.23] 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.

For #69998.
Fixes #70001.

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>
(cherry picked from commit 2a98a1849f059ffa94ab23a1ab7d8fa0fd0b48dd)
Reviewed-on: https://go-review.googlesource.com/c/go/+/622375
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/coro.go
src/runtime/pprof/pprof_test.go