]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/vcweb: fix a data race in the overview handler
authorBryan C. Mills <bcmills@google.com>
Thu, 10 Nov 2022 22:00:18 +0000 (17:00 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 11 Nov 2022 16:04:21 +0000 (16:04 +0000)
commitfcd14bdcbdfbb5b0c79cfecff95291837836a76d
treec7646aac619f3e9941f04404fe77c34927b0abbb
parentfffda6b3adfb4d05290c58939a78a99643398ff1
cmd/go/internal/vcweb: fix a data race in the overview handler

I forgot to lock the scriptResult in the overview handler, and
apparently a cmd/go test is incidentally fetching the overview page at
some point during test execution, triggering the race.

This race was caught almost immediately by the new
linux-amd64-longtest-race builder (see
https://build.golang.org/log/85ab78169a6382a73b1a26c89e64138b387da217).

Updates #27494.

Change-Id: I06ee8d54dba400800284401428ba4a59809983b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/449517
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/vcweb/vcstest/vcstest_test.go
src/cmd/go/internal/vcweb/vcweb.go