]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.10] cmd/cgo: make sure we FinishType everything
authorKeith Randall <khr@golang.org>
Thu, 26 Jul 2018 23:33:27 +0000 (16:33 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 8 Aug 2018 00:27:20 +0000 (00:27 +0000)
commit0f1c9decc99e501fcc5134dba4d5a53ce0fd830d
tree09392730c87937c347352e5afea6999ed66553ea
parent2b07564d191f8604c847859b536390bef5954f88
[release-branch.go1.10] cmd/cgo: make sure we FinishType everything

Ensure that we call FinishType on all the types added to the ptrs map.
We only add a key to ptrKeys once. Once we FinishType for that key,
we'll never look at that key again. But we can add a new type under that
key later, and we'll never finish it.

Make sure we add the key to the ptrKeys list every time we make the list
of types for that key non-empty.

This makes sure we FinishType each pointer type exactly once.

Update #25036

Change-Id: Iad86150d516fcfac167591daf5a26c38bec7d143
Reviewed-on: https://go-review.googlesource.com/126275
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/128095
misc/cgo/test/issue26517.go [new file with mode: 0644]
src/cmd/cgo/gcc.go