-
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: DUFFZERO in autogenerated methods corrupts LR #12108
Comments
Reducing the size of |
Here is a shorter example
|
It's duffzero
For some reason, when duffzero is required, it's being invoked twice. |
Sorry. I think I was wrong about DUFFZERO. After looking at arm64 and amd64 output, this appears to be consistent, all archs' have this double duffzero pattern. However when duffzero is not present, no corruption appears. |
I see a problem in that: the tail call to the underlying method assumes that lr still points to the caller of the wrapper method, but the bl to duffzero stomps on that. |
CL https://golang.org/cl/13570 mentions this issue. |
Update #12108 If DUFFZERO is used within a tail call method it will overwrite the link register. Change-Id: I6abd2fde0f0ad909ccd55eb119b992673a74f0e2 Reviewed-on: https://go-review.googlesource.com/13570 Reviewed-by: Russ Cox <rsc@golang.org>
Update golang#12108 If DUFFZERO is used within a tail call method it will overwrite the link register. Change-Id: I6abd2fde0f0ad909ccd55eb119b992673a74f0e2
CL https://golang.org/cl/14937 mentions this issue. |
CL https://golang.org/cl/32181 mentions this issue. |
The following program faults on ppc64le
http://play.golang.org/p/hRlQs7hss2
The program does not fault on any other architecture.
/cc @rsc @aclements @minux
The text was updated successfully, but these errors were encountered: