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/go: go1.11.4 toolchain3 build fail with "slice bounds out of range" on 32-bit MIPS on Debian buildd [1.11 backport] #29442

Closed
gopherbot opened this issue Dec 28, 2018 · 4 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@anthonyfok requested issue #29402 to be considered for backport to the next 1.11 minor release.

@gopherbot please consider this for backport to 1.11, otherwise release-branch.go1.11 would fail to build on 32-bit MIPS. Thanks!

@anthonyfok
Copy link

@cherrymui When you are free, could you please look into cherry-picking your fix to go1.11 too?
Many thanks!

@gopherbot
Copy link
Author

Change https://golang.org/cl/155799 mentions this issue: [release-branch.go1.11] cmd/compile: fix MIPS SGTconst-with-shift rules

@katiehockman katiehockman added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Jan 4, 2019
@katiehockman
Copy link
Contributor

Approving the cherry pick since this constitutes a serious problem with no workaround.

@gopherbot
Copy link
Author

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

gopherbot pushed a commit that referenced this issue Jan 4, 2019
(SGTconst [c] (SRLconst _ [d])) && 0 <= int32(c) && uint32(d) <= 31 && 1<<(32-uint32(d)) <= int32(c) -> (MOVWconst [1])

This rule is problematic. 1<<(32-uint32(d)) <= int32(c) meant to
say that it is true if c is greater than the largest possible
value of the right shift. But when d==1, 1<<(32-1) is negative
and results in the wrong comparison.

Rewrite the rules in a more direct way.

Updates #29402.
Fixes #29442.

Change-Id: I5940fc9538d9bc3a4bcae8aa34672867540dc60e
Reviewed-on: https://go-review.googlesource.com/c/155798
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit 6a64efc)
Reviewed-on: https://go-review.googlesource.com/c/155799
Reviewed-by: David Chase <drchase@google.com>
@julieqiu julieqiu modified the milestones: Go1.11.5, Go1.11.6 Jan 23, 2019
@golang golang locked and limited conversation to collaborators Jan 23, 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

4 participants