1
0
mirror of https://github.com/golang/go synced 2024-11-17 07:54:41 -07:00
go/misc/cgo/testsanitizers
Bryan C. Mills e57350f4c0 runtime: fix _cgo_yield usage with sysmon and on BSD
There are a few problems from change 35494, discovered during testing
of change 37852.

1. I was confused about the usage of n.key in the sema variant, so we
   were looping on the wrong condition. The error was not caught by
   the TryBots (presumably due to missing TSAN coverage in the BSD and
   darwin builders?).

2. The sysmon goroutine sometimes skips notetsleep entirely, using
   direct usleep syscalls instead. In that case, we were not calling
   _cgo_yield, leading to missed signals under TSAN.

3. Some notetsleep calls have long finite timeouts. They should be
   broken up into smaller chunks with a yield at the end of each
   chunk.

updates #18717

Change-Id: I91175af5dea3857deebc686f51a8a40f9d690bcc
Reviewed-on: https://go-review.googlesource.com/37867
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-03-09 18:36:49 +00:00
..
msan2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
msan3.go cmd/cgo, runtime: exported Go functions can't return a Go pointer 2015-11-19 18:28:39 +00:00
msan4.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
msan5.go runtime: add missing race and msan checks to reflect functions 2016-08-23 13:12:15 +00:00
msan_fail.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
msan_shared.go runtime: check for nil g and m in msanread 2017-01-19 23:06:54 +00:00
msan.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
test.bash runtime: fix _cgo_yield usage with sysmon and on BSD 2017-03-09 18:36:49 +00:00
tsan2.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
tsan3.go cmd/cgo: mark stub functions as no_sanitize_thread 2016-05-19 17:29:13 +00:00
tsan4.go cmd/cgo, runtime, runtime/cgo: TSAN support for malloc 2016-05-25 23:22:24 +00:00
tsan5.go runtime/cgo: add TSAN acquire/release calls 2016-05-31 20:53:16 +00:00
tsan6.go runtime/cgo: add TSAN locks around mmap call 2016-06-03 18:26:01 +00:00
tsan7.go runtime/cgo: add tsan acquire/release around setenv/unsetenv 2016-08-23 14:07:58 +00:00
tsan8.go runtime/cgo: use libc for sigaction syscalls when possible 2016-11-16 05:38:38 +00:00
tsan9.go runtime: preserve callee-saved C registers in sigtramp 2016-12-15 23:41:06 +00:00
tsan10.go runtime: poll libc to deliver signals under TSAN 2017-03-08 18:58:30 +00:00
tsan11.go runtime: fix _cgo_yield usage with sysmon and on BSD 2017-03-09 18:36:49 +00:00
tsan.go all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00