diff options
| author | Damien Neil <dneil@google.com> | 2025-06-05 13:47:06 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-06-10 15:02:26 -0700 |
| commit | 4f86f2267167a63b673c4a2a2994e008b32c90ea (patch) | |
| tree | 24dd8afd3e0e54897f199a95a151ccd5be83fab7 /src/runtime/export_test.go | |
| parent | 773701a853a3105696c59c2b92b2eff35e0e055b (diff) | |
| download | go-4f86f2267167a63b673c4a2a2994e008b32c90ea.tar.xz | |
testing/synctest, runtime: avoid panic when using linker-alloc WG from bubble
We associate WaitGroups with synctest bubbles by attaching a
special to the WaitGroup. It is not possible to attach a special
to a linker-allocated value, such as:
var wg sync.WaitGroup
Avoid panicking when accessing a linker-allocated WaitGroup
from a bubble. We have no way to associate these WaitGroups
with a bubble, so just treat them as always unbubbled.
This is probably fine, since the WaitGroup was always
created outside the bubble in this case.
Fixes #74005
Change-Id: Ic71514b0b8d0cecd62e45cc929ffcbeb16f54a55
Reviewed-on: https://go-review.googlesource.com/c/go/+/679695
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/export_test.go')
| -rw-r--r-- | src/runtime/export_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go index a9cc767e30..83cf301be4 100644 --- a/src/runtime/export_test.go +++ b/src/runtime/export_test.go @@ -1911,3 +1911,9 @@ func (b BitCursor) Write(data *byte, cnt uintptr) { func (b BitCursor) Offset(cnt uintptr) BitCursor { return BitCursor{b: b.b.offset(cnt)} } + +const ( + BubbleAssocUnbubbled = bubbleAssocUnbubbled + BubbleAssocCurrentBubble = bubbleAssocCurrentBubble + BubbleAssocOtherBubble = bubbleAssocOtherBubble +) |
