]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: prevent double lock in checkdead by unlocking before throws
authorLucien Coffe <lucien.coffe@botify.com>
Fri, 21 Apr 2023 15:20:19 +0000 (17:20 +0200)
committerGopher Robot <gobot@golang.org>
Fri, 21 Apr 2023 20:14:08 +0000 (20:14 +0000)
commitf229787affbcaafb55dac2ceae65282b172e253a
treeca6a823087ca9d55bf1226e138129c0f2638fd0e
parent6328e445c3a87d64a32b6203af3f39d43d874f9f
runtime: prevent double lock in checkdead by unlocking before throws

This change resolves an issue where checkdead could result in a double lock when shedtrace is enabled. This fix involves adding unlocks before all throws in the checkdead function to ensure the scheduler lock is properly released.

Fixes #59758

Change-Id: If3ddf9969f4582c3c88dee9b9ecc355a63958103
Reviewed-on: https://go-review.googlesource.com/c/go/+/487375
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/proc.go