Skip to content

testing/synctest: panic when calling WaitGroup.Add on a package-scope WaitGroup #74005

Open
@neild

Description

@neild
var wg sync.WaitGroup

func TestWaitGroupGlobal(t *testing.T) {
        synctest.Run(func() {
                wg.Go(func() {})
                wg.Wait()
        })
}
fatal error: getOrSetBubbleSpecial on invalid pointer

The problem is that wg isn't in any span, and we can only associate specials with objects in spans.

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.NeedsFixThe path to resolution is known, but the work has not been done.release-blocker

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions