]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: check pointers for deferred C calls at the right time
authorIan Lance Taylor <iant@golang.org>
Wed, 1 Jun 2016 22:24:14 +0000 (15:24 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 3 Jun 2016 20:51:39 +0000 (20:51 +0000)
commit7b48020cfeb64d1f841a7523aa841dbe53b3b465
tree5e36f2031243cd5d9ee4a5a74dcccc2d64347bfc
parent55559f159e4ba7645a864c89caba0e29498425f9
cmd/cgo: check pointers for deferred C calls at the right time

We used to check time at the point of the defer statement. This change
fixes cgo to check them when the deferred function is executed.

Fixes #15921.

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