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 use of CMN on arm64 [1.16 backport] #50866

Closed
gopherbot opened this issue Jan 27, 2022 · 3 comments
Closed

cmd/compile: incorrect use of CMN on arm64 [1.16 backport] #50866

gopherbot opened this issue Jan 27, 2022 · 3 comments
Labels
CherryPickApproved
Milestone

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 27, 2022

@dr2chase requested issue #50854 to be considered for backport to the next 1.16 minor release.

@gopherbot, please backport to Go 1.16 and Go 1.17. This is an arm and arm64 compiler bug that generates incorrect code with the usual possibility of data corruption. The "fix" involves disabling an (incorrect) optimization in the "rules" (pattern-transmformations), so it is believed low risk.

@gopherbot gopherbot added the CherryPickCandidate label Jan 27, 2022
@gopherbot gopherbot added this to the Go1.16.14 milestone Jan 27, 2022
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Jan 28, 2022

Change https://golang.org/cl/381475 mentions this issue: [release-branch.go1.16] cmd/compile: remove incorrect arm,arm64 CMP->CMN transformations

@toothrot toothrot added the CherryPickApproved label Feb 3, 2022
@toothrot
Copy link
Contributor

@toothrot toothrot commented Feb 3, 2022

Approved. This is a serious issue with no workaround.

@gopherbot gopherbot removed the CherryPickCandidate label Feb 3, 2022
@gopherbot
Copy link
Author

@gopherbot gopherbot commented Feb 7, 2022

Closed by merging 4d284ea to release-branch.go1.16.

gopherbot pushed a commit that referenced this issue Feb 7, 2022
…CMN transformations

These can go wrong when one of the operands is the minimum integer value.

Fixes #50866.

Change-Id: I238fe284f60c7ee5aeb9dc9a18e8b1578cdb77d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/381318
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit b7b44b3)
Reviewed-on: https://go-review.googlesource.com/c/go/+/381475
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved
Projects
None yet
Development

No branches or pull requests

2 participants