-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: unexpected "slice bounds out of range" panic on GOOS=nacl with inlining #20811
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
Comments
Perhaps related to |
I guess it is more due to GOARCH=amd64p32 than GOOS=nacl. I'll take a look. |
Yeah, I think amd64p32 bug as well. Somewhat more minimized test case: https://play.golang.org/p/7TrGkx7nM9 It looks like we're not correctly handing int64 => int conversions on amd64p32 in some cases. Edit: Further minimized: https://play.golang.org/p/MkFBo5vIO2 |
@cherrymui It looks like an SSA bug to me, so I'm happy to let you take it from here. |
Yeah, it looks like an SSA bug. Thank you for minimizing test case! |
CL https://golang.org/cl/46870 mentions this issue. |
The following program panics on the playground (and the playground only):
https://play.golang.org/p/XXdD7dPPc4
But it shouldn't. On a 32-bit environment,
int(i)
is 0, sov[n : n+3]
should be an okay slice of length 3.It does not panic for me locally with Go 1.8.3, nor 1.9beta2, when running with
GOARCH=386
.It also doesn't panic if either of the two commented lines are uncommented. Feels related to inlining.
Is it a bug on the playground?
The text was updated successfully, but these errors were encountered: