mirror of
https://github.com/golang/go
synced 2024-11-25 16:57:58 -07:00
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 #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>
This commit is contained in:
parent
42f1b37b7b
commit
0f57c88bce
2
misc/cgo/testsanitizers/testdata/tsan11.go
vendored
2
misc/cgo/testsanitizers/testdata/tsan11.go
vendored
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user