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

runtime/cgo: s390x not saving/restoring callee-saved floating point registers #18035

Closed
mundaym opened this issue Nov 23, 2016 · 2 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mundaym
Copy link
Member

mundaym commented Nov 23, 2016

The crosscall code on s390x saves f0, f2, f4 and f6 in the caller's stack frame. However actually these are volatile and so don't need to be saved. More importantly f8-f15 are callee-save on s390x even though there is no space allocated for them on the caller's stack (like there is for general purpose registers). So if C code calls back into Go we might clobber floating point registers that C expects to be saved.

I noticed this while looking at the standard. I don't think any projects/tests have run into this yet, but I think it is a clear enough bug to be worth fixing for 1.8.

@bradfitz bradfitz added this to the Go1.8Maybe milestone Nov 23, 2016
@bradfitz
Copy link
Contributor

If you think it's really important and have a fix soon, and the fix is confined to s390x code.

@gopherbot
Copy link

CL https://golang.org/cl/33571 mentions this issue.

@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 23, 2016
@golang golang locked and limited conversation to collaborators Nov 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants