-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go/internal/test: data race in (*runCache).builderRunTest #38077
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
Comments
@gopherbot, please backport to Go 1.13 and 1.14. This is a data race in |
Backport issue(s) opened: #38082 (for 1.13), #38083 (for 1.14). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/225577 mentions this issue: |
Change https://golang.org/cl/225578 mentions this issue: |
Change https://golang.org/cl/225659 mentions this issue: |
Change https://golang.org/cl/225660 mentions this issue: |
EnvForDir does not immediately evoke “append”, and thus may not prompt the reader to consider the possibility of aliasing bugs (as in issue #38077). To make this behavior more obvious at the call site, rename cmd/go/internal/base.EnvForDir to AppendPWD and swap the order of arguments to a conventional “append” function (similar to those in the strconv package). For #38077 Change-Id: I16f09aa0fa8a269d51f0511eb402a44e2759eb94 Reviewed-on: https://go-review.googlesource.com/c/go/+/225578 Reviewed-by: Jay Conrod <[email protected]> Reviewed-by: Michael Matloob <[email protected]>
…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 #38082 Updates #38077 Change-Id: I731d5bbd0e516642c2cf43e713eeea15402604e5 Reviewed-on: https://go-review.googlesource.com/c/go/+/225577 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]> Reviewed-by: Michael Matloob <[email protected]> (cherry picked from commit bfb1342) Reviewed-on: https://go-review.googlesource.com/c/go/+/225660
…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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jay Conrod <[email protected]> Reviewed-by: Michael Matloob <[email protected]> (cherry picked from commit bfb1342) Reviewed-on: https://go-review.googlesource.com/c/go/+/225659
from https://storage.googleapis.com/go-build-log/740b8807/windows-amd64-race_04d83703.log (CL 224038):
This race had been masked by missing
cmd/go
test coverage on the-race
builders (#37940).The text was updated successfully, but these errors were encountered: