]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: fix use of unsafe argument in new deferred function
authorIan Lance Taylor <iant@golang.org>
Thu, 9 Jun 2016 18:19:26 +0000 (11:19 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 9 Jun 2016 19:05:19 +0000 (19:05 +0000)
commit1bdf1c3024d75a3c4913d031d55257b311f0133f
tree32fefa0986962617003440e2bec71000155580eb
parent837984f37291f4fc48f9c99b65b0ab3f050bf4b9
cmd/cgo: fix use of unsafe argument in new deferred function

The combination of https://golang.org/cl/23650 and
https://golang.org/cl/23675 did not work--they were tested separately
but not together.

The problem was that 23650 introduced deferred argument checking, and
the deferred function loses the type that 23675 started requiring. The
fix is to go back to using an empty interface type in a deferred
argument check.

No new test required--fixes broken build.

Change-Id: I5ea023c5aed71d70e57b11c4551242d3ef25986d
Reviewed-on: https://go-review.googlesource.com/23961
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/cgo/gcc.go
src/cmd/cgo/main.go
src/cmd/cgo/out.go