Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go/internal/test: data race in (*runCache).builderRunTest [1.14 backport] #38083

Closed
gopherbot opened this issue Mar 26, 2020 · 2 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@bcmills requested issue #38077 to be considered for backport to the next 1.14 minor release.

@gopherbot, please backport to Go 1.13 and 1.14. This is a data race in cmd/go, and data races can lead to arbitrary memory corruption.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Mar 26, 2020
@gopherbot gopherbot added this to the Go1.14.2 milestone Mar 26, 2020
@gopherbot
Copy link
Author

Change https://golang.org/cl/225659 mentions this issue: [release-branch.go1.14] cmd/go: do not append to the global cfg.OrigEnv slice

@andybons andybons added the CherryPickApproved Used during the release process for point releases label Mar 26, 2020
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Mar 26, 2020
@gopherbot
Copy link
Author

Closed by merging 612ef03 to release-branch.go1.14.

gopherbot pushed a commit that referenced this issue Mar 26, 2020
…nv slice

Appending to a global slice is only safe if its length is already
equal to its capacity. That property is not guaranteed for slices in
general, and empirically does not hold for this one.

This is a minimal fix to make it easier to backport.
A more robust cleanup of the base.EnvForDir function will be sent in a
subsequent CL.

Fixes #38083
Updates #38077

Change-Id: I731d5bbd0e516642c2cf43e713eeea15402604e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/225577
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
(cherry picked from commit bfb1342)
Reviewed-on: https://go-review.googlesource.com/c/go/+/225659
@golang golang locked and limited conversation to collaborators Mar 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

2 participants