]> Cypherpunks repositories - gostls13.git/commit
cgo: use correct frame size for 0 arguments
authorRuss Cox <rsc@golang.org>
Sat, 5 Mar 2011 19:24:44 +0000 (14:24 -0500)
committerRuss Cox <rsc@golang.org>
Sat, 5 Mar 2011 19:24:44 +0000 (14:24 -0500)
commit11695596588172331984de8a443eedbd44c56bd5
tree1f05065d8cdee241664e53b9c8aac5c3dca66609
parentd42bfe26ad003cf2c29dc1b8cf21026f4a2a8fb9
cgo: use correct frame size for 0 arguments

Passing a frame size of 1 was causing the cgo callback
to push 1 byte of arguments onto the stack, making
the stack pointer misaligned, which had the effect of
hiding all the pointers on the stack from the garbage
collector.

SWIG only wraps calls to C++ virtual methods, so it
always has at least 1 argument, so SWIG does not need
to be fixed too.

Fixes #1328.

R=iant
CC=golang-dev
https://golang.org/cl/4261046
src/cmd/cgo/out.go