aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2022-05-27 11:42:59 -0400
committerDmitri Shuralyov <dmitshur@golang.org>2022-05-30 20:29:29 +0000
commitda608a20ed87b7c6c860eaaf4f2dec39492f9da4 (patch)
treeec106da1337944a162ffb34233f75086d3064bc7
parenta34f42077461688bb5e1318e4e04d20c91f1ab8a (diff)
downloadgo-da608a20ed87b7c6c860eaaf4f2dec39492f9da4.tar.gz
go-da608a20ed87b7c6c860eaaf4f2dec39492f9da4.zip
[release-branch.go1.18] misc/cgo/testsanitizers: buffer the signal channel in TestTSAN/tsan11
This fix is analogous to the one in CL 407888. 'go vet' catches the error, but it is not run on this file because the file is (only) compiled when running testsanitizers/TestTSAN. Fixes #53115. Updates #53113. Change-Id: I74f7b7390a9775ff00a06214c1019ba28846dd11 Reviewed-on: https://go-review.googlesource.com/c/go/+/409094 Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> (cherry picked from commit 0f57c88bce9899a91686646a1e9cd7aae55911ef) Reviewed-on: https://go-review.googlesource.com/c/go/+/408823 Reviewed-by: Ian Lance Taylor <iant@google.com>
-rw-r--r--misc/cgo/testsanitizers/testdata/tsan11.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/cgo/testsanitizers/testdata/tsan11.go b/misc/cgo/testsanitizers/testdata/tsan11.go
index 70ac9c8ae2..189e10f699 100644
--- a/misc/cgo/testsanitizers/testdata/tsan11.go
+++ b/misc/cgo/testsanitizers/testdata/tsan11.go
@@ -45,7 +45,7 @@ static void register_handler(int signo) {
import "C"
func main() {
- ch := make(chan os.Signal)
+ ch := make(chan os.Signal, 1)
signal.Notify(ch, syscall.SIGUSR2)
C.register_handler(C.int(syscall.SIGUSR1))