Skip to content

bytes: comparing long byte slices on s390x gives incorrect results #26114

@billotosyr

Description

@billotosyr

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

master tip, plus 1.10, 1.9, 1.8, etc

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GOARCH="s390x"
GOBIN=""
GOEXE=""
GOHOSTARCH="s390x"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/gsa/tlbgsa/home/b/i/billo/work"
GORACE=""
GOROOT="/sandbox/billo/master/go"
GOTOOLDIR="/sandbox/billo/master/go/pkg/tool/linux_s390x"
GCCGO="gccgo"
CC="s390x-linux-gnu-gcc"
GOGCCFLAGS="-fPIC -m64 -march=z196 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build416940965=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

https://play.golang.org/p/A_j0ONgu6hS

What did you expect to see?

-1

What did you see instead?

0

This showed up in a leveldb application. I have a fix -- will submit the CL shortly. Also hoping for a backport to 1.10 and 1.9 if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions