Skip to content

testing: data race on done between Run() and Log() #41864

@fraenkel

Description

@fraenkel

Using 1.15.2

WARNING: DATA RACE
Read at 0x00c0002dedc3 by goroutine 25
  testing.(*common).logDepth()
      /usr/local/go/src/testing/testing.go:736 +0xa9
  testing.(*common).log()
      /usr/local/go/src/testing/testing.go:729 +0x8f
  testing.(*common).Logf()
      /usr/local/go/src/testing/testing.go:775 +0x21
  testing.(*T).Logf()

Previous write at 0x00c0002dedc3 by goroutine 20
  testing.tRunner.func1()
      /usr/local/go/src/testing/testing.go:1113 +0x484
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1131 +0x22a

Just looks like we are missing a lock/unlock pair.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions