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

Comments

Projects
None yet
4 participants
@gopherbot
Copy link

commented Dec 28, 2018

@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

This comment has been minimized.

Copy link

commented Dec 28, 2018

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

@gopherbot

This comment has been minimized.

Copy link
Author

commented Dec 28, 2018

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

@katiehockman

This comment has been minimized.

Copy link
Contributor

commented Jan 4, 2019

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

@gopherbot

This comment has been minimized.

Copy link
Author

commented Jan 4, 2019

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

@gopherbot gopherbot closed this Jan 4, 2019

gopherbot pushed a commit that referenced this issue Jan 4, 2019

[release-branch.go1.11] cmd/compile: fix MIPS SGTconst-with-shift rules
(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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.