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

mdempsky opened this Issue Nov 30, 2016 · 2 comments


None yet
5 participants

mdempsky commented Nov 30, 2016

_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

@mdempsky mdempsky added this to the Go1.9 milestone Nov 30, 2016


This comment has been minimized.


bradfitz commented Nov 30, 2016

For putting bools into interface values: #17725


This comment has been minimized.

gopherbot commented Jan 24, 2017

CL mentions this issue.

gopherbot pushed a commit that referenced this issue Feb 2, 2017

cmd/compile, runtime: convert byte-sized values to interfaces without…
… allocation

Based in part on khr's CL 2500.

Updates #17725
Updates #18121

Change-Id: I744e1f92fc2104e6c5bd883a898c30b2eea8cc31
Run-TryBot: Josh Bleecher Snyder <>
TryBot-Result: Gobot Gobot <>
Reviewed-by: Keith Randall <>

@ALTree ALTree modified the milestones: Go1.10, Go1.9 Jun 6, 2017

@rsc rsc modified the milestones: Go1.10, Go1.11 Nov 22, 2017

@gopherbot gopherbot modified the milestones: Go1.11, Unplanned May 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment