-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: linux/s390x: inlining bug in s390x #64468
Comments
Putting |
Also note that this problem is not present in Go 1.20.11 |
Btw, s390x is the only big endian platform I have access to. This problem does not occur on the multiple little endian platforms I have tested this on. In other words, I don't know if this problem affects all big endian platforms or only s390x. |
Just confirmed it also happens with ppc64 |
Hm, I'm having trouble seeing the problem here.
Produces assembly for Unless there is a bug in print. Or this is a bug in the compiler when run on the platform. I will try to reproduce that way. |
cc @golang/s390x |
Not a cross-compile, but IBM has confirmed the bug w/ details on the assembly/ML : https://groups.google.com/g/golang-nuts/c/TYGuzUTTsN8/m/pHwtGqo8AAAJ |
I can reproduce on the ppc64 platform. For some reason, inlining happens differently when on platform then when cross compiling. (That's a separate issue which I will investigate - the toolchain should generate identical assembly no matter the platform.) I think I see the bug, something wrong with the memcombine pass with big-endian and elements bigger than a byte. |
Change https://go.dev/cl/546355 mentions this issue: |
@gopherbot please open a backport issue for 1.21. This is a pretty serious miscompilation with no easy workaround. |
Backport issue(s) opened: #64472 (for 1.21). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Go version
Go 1.21.4
What operating system and processor architecture are you using (
go env
)?What did you do?
https://go.dev/play/p/d9uIJAd1yEr
What did you expect to see?
ABCDEF12
ABCDEF12
What did you see instead?
ABCDEF12
ABCDEF12000000
( Note that go.dev/play gives the correct answer; presumably because it is not running on Linux/s390x )
The text was updated successfully, but these errors were encountered: