Skip to content

Commit 909881d

Browse files
Bryan C. Millsdmitshur
authored andcommitted
[release-branch.go1.17] 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 #53114. Updates #53113. Change-Id: I74f7b7390a9775ff00a06214c1019ba28846dd11 Reviewed-on: https://go-review.googlesource.com/c/go/+/409094 Auto-Submit: Bryan Mills <[email protected]> Reviewed-by: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Bryan Mills <[email protected]> (cherry picked from commit 0f57c88) Reviewed-on: https://go-review.googlesource.com/c/go/+/408824 Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 03c2e56 commit 909881d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

misc/cgo/testsanitizers/testdata/tsan11.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static void register_handler(int signo) {
4545
import "C"
4646

4747
func main() {
48-
ch := make(chan os.Signal)
48+
ch := make(chan os.Signal, 1)
4949
signal.Notify(ch, syscall.SIGUSR2)
5050

5151
C.register_handler(C.int(syscall.SIGUSR1))

0 commit comments

Comments
 (0)