aboutsummaryrefslogtreecommitdiff
path: root/src/run.bash
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-02-15 10:58:55 -0500
committerRuss Cox <rsc@golang.org>2014-02-15 10:58:55 -0500
commit7a7c0ffb478847a0711f6b829a615ef4eea5dc67 (patch)
treeb3bb2f452ef4e85c6ef7c58bfce43c55f2c7b5d9 /src/run.bash
parent15d294991fe31d962a09f4ab4d4778168c04ceb6 (diff)
downloadgo-7a7c0ffb478847a0711f6b829a615ef4eea5dc67.tar.gz
go-7a7c0ffb478847a0711f6b829a615ef4eea5dc67.zip
cmd/gc: correct liveness for fat variables
The VARDEF placement must be before the initialization but after any final use. If you have something like s = ... using s ... the rhs must be evaluated, then the VARDEF, then the lhs assigned. There is a large comment in pgen.c on gvardef explaining this in more detail. This CL also includes Ian's suggestions from earlier CLs, namely commenting the use of mode in link.h and fixing the precedence of the ~r check in dcl.c. This CL enables the check that if liveness analysis decides a variable is live on entry to the function, that variable must be a function parameter (not a result, and not a local variable). If this check fails, it indicates a bug in the liveness analysis or in the generated code being analyzed. The race detector generates invalid code for append(x, y...). The code declares a temporary t and then uses cap(t) before initializing t. The new liveness check catches this bug and stops the compiler from writing out the buggy code. Consequently, this CL disables the race detector tests in run.bash until the race detector bug can be fixed (golang.org/issue/7334). Except for the race detector bug, the liveness analysis check does not detect any problems (this CL and the previous CLs fixed all the detected problems). The net test still fails with GOGC=0 but the rest of the tests now pass or time out (because GOGC=0 is so slow). TBR=iant CC=golang-codereviews https://golang.org/cl/64170043
Diffstat (limited to 'src/run.bash')
-rwxr-xr-xsrc/run.bash3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/run.bash b/src/run.bash
index 6adb7f63de..c67c764ec1 100755
--- a/src/run.bash
+++ b/src/run.bash
@@ -57,8 +57,9 @@ go test sync -short -timeout=$(expr 120 \* $timeout_scale)s -cpu=10
# Race detector only supported on Linux and OS X,
# and only on amd64, and only when cgo is enabled.
+# Disabled due to golang.org/issue/7334; remove XXX below to reenable.
case "$GOHOSTOS-$GOOS-$GOARCH-$CGO_ENABLED" in
-linux-linux-amd64-1 | darwin-darwin-amd64-1)
+XXXlinux-linux-amd64-1 | XXXdarwin-darwin-amd64-1)
echo
echo '# Testing race detector.'
go test -race -i runtime/race flag