]> Cypherpunks repositories - gostls13.git/commit
runtime: record synctest bubble ownership in hchan
authorDamien Neil <dneil@google.com>
Tue, 20 May 2025 18:16:23 +0000 (11:16 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 20 May 2025 22:57:34 +0000 (15:57 -0700)
commit0afcf9192ca27cb35249cfd1728858517371a382
tree837fa37dc2f066e16e9ea81e2585567c24128568
parent68bc0d84e9dd74a02472bfff744e0650b4b1653c
runtime: record synctest bubble ownership in hchan

Replace the hchan.synctest bool with an hchan.bubble reference
to the synctest bubble that created the chan. I originally used
a bool to avoid increasing the size of hchan, but we have space
in hchan's current size class for another pointer.

This lets us detect one bubble operating on a chan created
in a different bubble.

For #67434

Change-Id: If6cf9ffcb372fe7fb3f8f4ef27b664848578ba5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/674515
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
src/internal/synctest/synctest_test.go
src/runtime/chan.go
src/runtime/select.go