Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
billotosyr opened this issue Jun 28, 2018 · 6 comments
Closed

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

billotosyr opened this issue Jun 28, 2018 · 6 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@billotosyr
Copy link

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.

@mundaym mundaym added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 28, 2018
@mundaym mundaym added this to the Go1.11 milestone Jun 28, 2018
@bcmills
Copy link
Contributor

bcmills commented Jun 28, 2018

@gopherbot, please consider backport to 1.10 and 1.9.

@gopherbot
Copy link

Backport issue(s) opened: #26117 (for 1.10), #26118 (for 1.9).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

@gopherbot
Copy link

Change https://golang.org/cl/121495 mentions this issue: bytes: fix comparison of long byte slices on s390x

@odeke-em
Copy link
Member

odeke-em commented Jun 29, 2018

@billotosyr @bcmills might we know the cause/bissect of this regression?

@mundaym
Copy link
Member

mundaym commented Jun 30, 2018

@odeke-em The incorrect assembly was part of the original port added in this CL: https://go-review.googlesource.com/c/go/+/20946 so it isn't a regression per se, but since the bug is nasty and the fix is trivial it makes sense to backport it.

@odeke-em
Copy link
Member

Cool, thanks @mundaym!

@golang golang locked and limited conversation to collaborators Jul 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants