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

cmd/compile: incorrect code generation bug when taking slice[:0] [1.11 backport] #29503

Closed
gopherbot opened this issue Jan 2, 2019 · 11 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@FiloSottile requested issue #29502 to be considered for backport to the next 1.11 minor release.

@gopherbot please open a backport issue for 1.11.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jan 2, 2019
@gopherbot gopherbot added this to the Go1.11.5 milestone Jan 2, 2019
@katiehockman
Copy link
Contributor

@FiloSottile would you consider this to be a serious issue without a workaround? If so, then we can approve this candidate now that the fix is in.

@FiloSottile
Copy link
Contributor

Yeah, this is a real miscompilation crash that was apparently detected in a real application.

@FiloSottile FiloSottile added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Jan 8, 2019
@mvdan
Copy link
Member

mvdan commented Jan 19, 2019

It was found by another developer; see #29833.

@julieqiu julieqiu modified the milestones: Go1.11.5, Go1.11.6 Jan 23, 2019
@tandr
Copy link

tandr commented Jan 23, 2019

So it is safe to assume this did not get into 1.11.5 even that it was approved for cherrypick, am I right?

@FiloSottile
Copy link
Contributor

Correct, this got pushed to Go 1.11.6 because 1.11.5 was a security-only release.

@kexirong
Copy link

Correct, this got pushed to Go 1.11.6 because 1.11.5 was a security-only release.

hi, When will the Go 1.11.6 be released?

@dmitshur
Copy link
Contributor

@cherrymui Would you like to mail a backport of CL 156019 onto the release-branch.go1.11, since you authored it, or would you prefer someone else to send it?

@cherrymui
Copy link
Member

Done. CL https://go-review.googlesource.com/c/go/+/163724. Thanks.

@gopherbot
Copy link
Author

Change https://golang.org/cl/163724 mentions this issue: [release-branch.go1.11] cmd/compile: fix deriving from x+d >= w on overflow in prove pass

@dmitshur
Copy link
Contributor

Thank you @cherrymui!

@gopherbot
Copy link
Author

Closed by merging c8c897a to release-branch.go1.11.

gopherbot pushed a commit that referenced this issue Feb 25, 2019
…erflow in prove pass

In the case of x+d >= w, where d and w are constants, we are
deriving x is within the bound of min=w-d and max=maxInt-d. When
there is an overflow (min >= max), we know only one of x >= min
or x <= max is true, and we derive this by excluding the other.
When excluding x >= min, we did not consider the equal case, so
we could incorrectly derive x <= max when x == min.

Updates #29502.
Fixes #29503.

Change-Id: Ia9f7d814264b1a3ddf78f52e2ce23377450e6e8a
Reviewed-on: https://go-review.googlesource.com/c/156019
Reviewed-by: David Chase <drchase@google.com>
(cherry picked from commit 2e217fa)
Reviewed-on: https://go-review.googlesource.com/c/163724
Run-TryBot: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Feb 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

9 participants