aboutsummaryrefslogtreecommitdiff
path: root/src/race.bash
AgeCommit message (Collapse)Author
2022-05-04cmd,runtime: enable race detector on s390xIlya Leoshkevich
LLVM has SystemZ ThreadSanitizer support now [1], this patch integrates it with golang. The biggest part is the glue code in race_s390x.s, which is derived from race_arm64.s, and then the support needs to be enabled in four places. [1] https://reviews.llvm.org/D105629 Change-Id: I1d4e51beb4042603b681e4aca9af6072879d54d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/336549 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Keith Randall <khr@golang.org>
2021-08-17src: simplify race.bash checking conditionCuong Manh Le
By using "uname -s -m" to get the OS name and hardware name, then using it to match supported platform in case command. Change-Id: I5161a29c6f3fe34dcda9e7bd477fa3b772b9e041 Reviewed-on: https://go-review.googlesource.com/c/go/+/320250 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-02-23runtime: enable race detector on openbsd/amd64Joel Sing
Now that this commit[1] has landed in LLVM the .syso file can be generated for OpenBSD. With the changes to src/runtime running the sample race[2] detects the data race as expected. Based on golang/go#39464 (https://go-review.googlesource.com/c/go/+/237057) from Aaron Bieber <deftly@gmail.com>, however the race_openbsd_amd64.syso file has been built on OpenBSD 6.4 and necessary changes added to race.bash. [1] https://github.com/llvm/llvm-project/commit/fcf6ae2f070eba73074b6ec8d8281e54d29dbeeb [2] https://golang.org/doc/articles/race_detector.html Change-Id: Ic2479ccfa91d6b2cb4585346a11d813d96450f68 Reviewed-on: https://go-review.googlesource.com/c/go/+/275892 Trust: Joel Sing <joel@sing.id.au> Run-TryBot: Joel Sing <joel@sing.id.au> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
2020-11-04race.bash: add darwin/arm64Cherry Zhang
Race detector support was added in previous CLs. Updates #38485. Change-Id: Ie9ae69406ff4770f573c2287bfbbb0421769b3ce Reviewed-on: https://go-review.googlesource.com/c/go/+/267098 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-11-13cmd,runtime: enable race detector on arm64Fangming.Fang
Changes include: 1. enable compiler option -race for arm64 2. add runtime/race_arm64.s to manage the calls from Go to the compiler-rt runtime 3. change racewalk.go to call racefuncenterfp instead of racefuncenter on arm64 to allow the caller pc to be obtained in the asm code before calling the tsan version 4. race_linux_arm64.syso comes from compiler-rt which just supports 48bit VA, compiler-rt is fetched from master branch which latest commit is 3aa2b775d08f903f804246af10b Fixes #25682 Change-Id: I04364c580b8157fd117deecae74a4656ba16e005 Reviewed-on: https://go-review.googlesource.com/c/138675 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
2018-07-10runtime/cgo: Add initial NetBSD Thread Sanitizer supportKamil Rytarowski
Recognize NetBSD in: - go/internal/work/init.go - race.bash - runtime/race/race.go Add __ps_strings symbol in runtime/cgo/netbsd.go as this is used internally in the TSan library for NetBSD and used for ReExec(). Tested on NetBSD/amd64 v. 8.99.12. Around 98% tests are passing for the ./race.bash target. Updates #19273 Change-Id: Ic0e48d2fb159a7868aab5e17156eeaca1225e513 GitHub-Last-Rev: d6e082707b9b18df1fe63f723666f4d2eb5e6cfe GitHub-Pull-Request: golang/go#24322 Reviewed-on: https://go-review.googlesource.com/99835 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-06-11runtime/race: implement race detector for ppc64leLynn Boger
This adds the support to enable the race detector for ppc64le. Added runtime/race_ppc64le.s to manage the calls from Go to the LLVM tsan functions, mostly converting from the Go ABI to the PPC64 ABI expected by Clang generated code. Changed racewalk.go to call racefuncenterfp instead of racefuncenter on ppc64le to allow the caller pc to be obtained in the asm code before calling the tsan version. Changed the set up code for racecallbackthunk so it doesn't use the autogenerated save and restore of the link register since that sequence uses registers inconsistent with the normal ppc64 ABI. Made various changes to recognize that race is supported for ppc64le. Ensured that tls_g is updated and accessible from race_linux_ppc64le.s so that the race ctx can be obtained and passed to tsan functions. This enables the race tests for ppc64le in cmd/dist/test.go and increases the timeout when running the benchmarks with the -race option to avoid timing out. Updates #24354, #23731 Change-Id: Ib97dc7ac313e6313c836dc7d2fb698f9d8fba3ef Reviewed-on: https://go-review.googlesource.com/107935 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-05-04src/*.bash: remove some trailing whitespaceZhou Peng
Change-Id: I11793daafdb69156b1dafaa80fe501fcaeeff202 Reviewed-on: https://go-review.googlesource.com/111435 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-12-29cmd/dist: make test default to --no-rebuildRuss Cox
I'm tired of having to remember it on every command. Rebuilding everything is the wrong default. This CL updates the build script, but the builders may (or may not) need work, depending on whether they rebuild using the test command (I doubt it). Change-Id: I21f202a2f13e73df3f6bd54ae6a317c467b68151 Reviewed-on: https://go-review.googlesource.com/18084 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-11all: link to https instead of httpBrad Fitzpatrick
The one in misc/makerelease/makerelease.go is particularly bad and probably warrants rotating our keys. I didn't update old weekly notes, and reverted some changes involving test code for now, since we're late in the Go 1.5 freeze. Otherwise, the rest are all auto-generated changes, and all manually reviewed. Change-Id: Ia2753576ab5d64826a167d259f48a2f50508792d Reviewed-on: https://go-review.googlesource.com/12048 Reviewed-by: Rob Pike <r@golang.org>
2015-06-09cmd/dist: move guts of race.bash into distBrad Fitzpatrick
After a little build coordinator change, this will get us sharding of the race builder. Update #11074 Change-Id: I4c55267563b6f5e213def7dd6707c837ae2106bf Reviewed-on: https://go-review.googlesource.com/10845 Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-02-23[dev.cc] cmd/go: fix expansion of 'std', add 'cmd'Russ Cox
The wildcard 'std' is defined in documentation to be all the packages in the Go standard library. It has also historically matched commands in the main repo, but as we implement core commands in Go, that becomes problematic. We need a wildcard that means just the library, and since 'std' is already documented to have that definition, make it so. Add a new wildcard 'cmd' for the commands in the main repo ($GOROOT). Commands that want both can say 'std cmd' (or 'cmd std') to get the effect of the old 'std'. Update make.bash etc to say both std and cmd most of the time. Exception: in race.bash, do not install race-enabled versions of the actual commands. This avoids trying to write binaries while using them, but more importantly it avoids enabling the race detector and its associated memory overhead for the already memory-hungry compilers. Change-Id: I26bb06cb13b636dfbe71a015ee0babeb270a0275 Reviewed-on: https://go-review.googlesource.com/5550 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2014-06-24race.bash: support freebsdDmitriy Vyukov
R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/110150044
2014-05-07race.bash,race.bat: unset GOROOT_FINAL during testsAlex Brainman
Just like run.* scripts do. Fixes race build. LGTM=dave, dvyukov R=dvyukov, dave CC=golang-codereviews https://golang.org/cl/98980043
2013-09-29race.bash, race.bat: build a race enabled cmd/cgo before trying to use itDave Cheney
Fixes #5537. To avoid `go install -v race std` replacing cmd/cgo with a race enabled version and another package trying to build a cgo enabled package, always build cmd/cgo race enabled before doing the rest of the build. R=remyoudompheng, rsc, dvyukov, minux.ma CC=golang-dev https://golang.org/cl/14071044
2013-01-28src: add race.bashDave Cheney
Add race.bash so anyone with suitable hardware can run a race detector build. race.bash can be called from the dashboard builder by passing -cmd="race.bash". Original source for race.bash is here, http://code.google.com/p/go-wiki/wiki/DashboardBuilders TODO: add race.bat for windows/amd64 R=dvyukov, minux.ma, adg, rsc CC=fullung, golang-dev https://golang.org/cl/7179052