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

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 26, 2020

@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

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Mar 26, 2020

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

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Mar 26, 2020

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

@gopherbot gopherbot closed this Mar 26, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.