]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: add hooks for thread sanitizer
authorIan Lance Taylor <iant@golang.org>
Fri, 4 Dec 2015 03:17:21 +0000 (19:17 -0800)
committerIan Lance Taylor <iant@golang.org>
Sun, 28 Feb 2016 04:56:17 +0000 (04:56 +0000)
commitc8ef0df06cbab367ab943825ab0677e03d019c3d
tree4cbd7ad6b7f9ae6b19ee1fd7af66014682262f79
parentc86dbbe1b989a05381d2635c97566d3e7b06eb62
cmd/cgo: add hooks for thread sanitizer

When Go code is used with C code compiled with -fsanitize=thread, adds
thread sanitizer calls so that correctly synchronized Go code does not
cause spurious failure reports from the thread sanitizer.  This may
cause some false negatives, but for the thread sanitizer what is most
important is avoiding false positives.

Change-Id: If670e4a6f2874c7a2be2ff7db8728c6036340a52
Reviewed-on: https://go-review.googlesource.com/17421
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
misc/cgo/testsanitizers/test.bash
misc/cgo/testsanitizers/tsan.go [new file with mode: 0644]
misc/cgo/testsanitizers/tsan2.go [new file with mode: 0644]
src/cmd/cgo/out.go