diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2016-10-28 17:12:39 +0200 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2016-10-30 16:15:54 +0000 |
commit | 042264ef1b073b1b485e6e24977e506e1a6bdb3f (patch) | |
tree | 3d669fedfbcfe03fae7ba3b680254ba48c2bbcda /src/runtime/race.go | |
parent | 7ba36f4adb43355ef4b870d64d23f9988b1279ea (diff) | |
download | go-042264ef1b073b1b485e6e24977e506e1a6bdb3f.tar.gz go-042264ef1b073b1b485e6e24977e506e1a6bdb3f.zip |
runtime/race: update race runtime
This updates the runtime to HEAD to keep it aligned and fixes some bugs.
http://llvm.org/viewvc/llvm-project?view=revision&revision=285454
fixes the crash on darwin related to unaligned data section (#17065).
http://llvm.org/viewvc/llvm-project?view=revision&revision=285451
enables core dumps by default (#16527).
http://llvm.org/viewvc/llvm-project?view=revision&revision=285455
adds a hook to obtain number of races reported so far (#15972).
Can now be obtained with:
//go:nosplit
func RaceReportCount() int {
var n uint64
racecall(&__tsan_report_count, uintptr(unsafe.Pointer(&n)), 0, 0, 0)
return int(n)
}
Fixes #16527.
Fixes #17065.
Update #15972.
Change-Id: I8f869cb6275c9521a47303f3810a9965e9314357
Reviewed-on: https://go-review.googlesource.com/32160
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/race.go')
-rw-r--r-- | src/runtime/race.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/race.go b/src/runtime/race.go index 6f24e09925..c8af8f6f50 100644 --- a/src/runtime/race.go +++ b/src/runtime/race.go @@ -176,6 +176,9 @@ var __tsan_go_ignore_sync_begin byte //go:linkname __tsan_go_ignore_sync_end __tsan_go_ignore_sync_end var __tsan_go_ignore_sync_end byte +//go:linkname __tsan_report_count __tsan_report_count +var __tsan_report_count byte + // Mimic what cmd/cgo would do. //go:cgo_import_static __tsan_init //go:cgo_import_static __tsan_fini @@ -192,6 +195,7 @@ var __tsan_go_ignore_sync_end byte //go:cgo_import_static __tsan_release_merge //go:cgo_import_static __tsan_go_ignore_sync_begin //go:cgo_import_static __tsan_go_ignore_sync_end +//go:cgo_import_static __tsan_report_count // These are called from race_amd64.s. //go:cgo_import_static __tsan_read |