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
Closed

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 2, 2019

@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.

@katiehockman

This comment has been minimized.

Copy link
Member

@katiehockman katiehockman commented Jan 3, 2019

@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

This comment has been minimized.

Copy link
Member

@FiloSottile FiloSottile commented Jan 8, 2019

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

@mvdan

This comment has been minimized.

Copy link
Member

@mvdan 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

This comment has been minimized.

Copy link

@tandr 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

This comment has been minimized.

Copy link
Member

@FiloSottile FiloSottile commented Jan 23, 2019

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

@kexirong

This comment has been minimized.

Copy link

@kexirong kexirong commented Jan 30, 2019

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

This comment has been minimized.

Copy link
Member

@dmitshur dmitshur commented Feb 25, 2019

@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

This comment has been minimized.

Copy link
Contributor

@cherrymui cherrymui commented Feb 25, 2019

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Feb 25, 2019

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

This comment has been minimized.

Copy link
Member

@dmitshur dmitshur commented Feb 25, 2019

Thank you @cherrymui!

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Feb 25, 2019

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

@gopherbot gopherbot closed this Feb 25, 2019
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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants
You can’t perform that action at this time.