Description
What version of Go are you using (go version
)?
The problematic behaviour is shown by: go1.10 linux/s390x
I also tested with go1.9 and go1.8 (from the go snap) and that works fine. Happy to
test more versions.
Does this issue reproduce with the latest release?
I have not tested master but it does reproduce with 1.10.
What operating system and processor architecture are you using (go env
)?
GOARCH="s390x"
GOBIN=""
GOCACHE="/home/ubuntu/.cache/go-build"
GOEXE=""
GOHOSTARCH="s390x"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ubuntu/go"
GORACE=""
GOROOT="/usr/lib/go-1.10"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.10/pkg/tool/linux_s390x"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -march=z196 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build233531017=/tmp/go-build -gno-record-gcc-switches"
What did you do?
On the s390x (with Ubuntu 18.04 (bionic)) many tests for our "snapd" project fail when using -covermode="atomic" but work fine with set other cover modes. A simple example:
$ go get github.com/snapcore/snapd
$ cd ~/go/src/github.com/snapcore/snapd/spdx
$ go test
OK: 3 passed
PASS
ok github.com/snapcore/snapd/spdx 0.003s
$ go test -covermode="atomic"
----------------------------------------------------------------------
PANIC: parser_test.go:53: spdxSuite.TestParseError
... Panic: runtime error: index out of range (PC=0x72EE3)
/usr/lib/go-1.10/src/runtime/panic.go:505
in gopanic
/usr/lib/go-1.10/src/runtime/panic.go:28
in panicindex
scanner.go:45
in spdxSplit
/usr/lib/go-1.10/src/bufio/scan.go:140
in Scanner.Scan
parser.go:89
in parser.validate
parser.go:76
in parser.Validate
validate.go:33
in ValidateLicense
parser_test.go:74
in spdxSuite.TestParseError
/usr/lib/go-1.10/src/reflect/value.go:308
in Value.Call
/usr/lib/go-1.10/src/runtime/asm_s390x.s:986
in goexit
What did you expect to see?
I was expecting the test to work regardless of the covermode. The covermodes "set" and "count" are fine, only with "atomic" things break.
What did you see instead?
Same output regardless of -covermode=
setting.
[edit: typos]