-
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/cgo: _cgoCheckPointer calling convention is suboptimal #18121
Comments
For putting bools into interface values: #17725 |
CL https://golang.org/cl/35555 mentions this issue. |
… allocation Based in part on khr's CL 2500. Updates #17725 Updates #18121 Change-Id: I744e1f92fc2104e6c5bd883a898c30b2eea8cc31 Reviewed-on: https://go-review.googlesource.com/35555 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
With https://go-review.googlesource.com/c/go/+/198081 it should be fixed, forgot to update the commit message. |
@egonelbre Thanks. I didn't notice any //go:noescape changes in that CL. Does it turn out that's not needed? |
AFAIU it that was addressed in 0358367, however, I did not verify it. |
@egonelbre Ah, right. I think this issue is fixed then. Thanks! |
_cgoCheckPointer is currently defined to take a ...interface{} parameter, but it always takes 0 or 1 arguments. And even in the 0 argument case, it would take less stack space to pass a nil interface{} value than a nil []interface{}.
Also, the []interface{} and the
true
argument used for pointers-to-fields currently escape to the heap. This could be addressed with the //go:noescape annotation./cc @ianlancetaylor
The text was updated successfully, but these errors were encountered: