]> Cypherpunks repositories - gostls13.git/commit
runtime, testing/synctest: breaking bubble isolation with Cond is fatal
authorDamien Neil <dneil@google.com>
Thu, 22 May 2025 18:14:53 +0000 (11:14 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 29 May 2025 19:49:36 +0000 (12:49 -0700)
commit21b7e60c6b64dd3221ab5b95d164fb42492029e8
tree97881264d6ec2f6c7f793b69dc7d215e0517b953
parent555d425d177db7fa7123779d253aee42980cb8a3
runtime, testing/synctest: breaking bubble isolation with Cond is fatal

sync.Cond.Wait is durably blocking. Waking a goroutine out of Cond.Wait
from outside its bubble panics.

Make this panic a fatal panic, since it leaves the notifyList in an
inconsistent state. We could do some work to make this a recoverable
panic, but the complexity doesn't seem worth the outcome.

For #67434

Change-Id: I88874c1519c2e5c0063175297a9b120cedabcd07
Reviewed-on: https://go-review.googlesource.com/c/go/+/675617
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
src/runtime/crash_test.go
src/runtime/sema.go
src/runtime/testdata/testprog/synctest.go [new file with mode: 0644]
src/testing/synctest/synctest.go