]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: fix aliasing bug in (*mvsReqs).Required with -mod=vendor
authorBryan C. Mills <bcmills@google.com>
Wed, 3 Apr 2019 13:45:48 +0000 (09:45 -0400)
committerBryan C. Mills <bcmills@google.com>
Wed, 3 Apr 2019 14:46:58 +0000 (14:46 +0000)
commit17436af8413071a50515c90af69c23f77cb201e3
tree5f9413286bfc123f6700d9b9bd8cde0dcefca34e
parent94507d2213fbd0a5e3b5276904f41c6bc0e03aba
cmd/go/internal/modload: fix aliasing bug in (*mvsReqs).Required with -mod=vendor

(*mvsReqs).Required assumes that it is safe to mutate the slice
returned by (*mvsReqs).required. In most cases, that was true, but in
the case of -mod=vendor it resulted in unsynchronized (and
potentially interfering) writes to the global vendorList.

Fixes #30550

Change-Id: I99bcc2037e0182418b7dfda1002f8b540dbf3a1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/170598
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/internal/modload/load.go