]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: run cgo pointer checks for pointer to union
authorIan Lance Taylor <iant@golang.org>
Mon, 14 Nov 2016 23:51:30 +0000 (15:51 -0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 15 Nov 2016 17:10:52 +0000 (17:10 +0000)
commit27b68474ca8bffea06a4dd11424b293243ae846c
treed590ec79c94d51a671fd4da6a22a1cdb777782a2
parentfab3fcaf750445c0016a44376aa81c720133e02c
cmd/cgo: run cgo pointer checks for pointer to union

If a C union type (or a C++ class type) can contain a pointer field,
then run the cgo checks on pointers to that type. This will test the
pointer as though it were an unsafe.Pointer, and will crash if it points
to Go memory that contains a pointer.

Fixes #15942.

Change-Id: Ic2d07ed9648d4b27078ae7683e26196bcbc59fc9
Reviewed-on: https://go-review.googlesource.com/33237
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
misc/cgo/errors/ptr.go
src/cmd/cgo/gcc.go