]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: fail on v, err := C.fn when fn is a builtin function
authorIan Lance Taylor <iant@golang.org>
Fri, 31 May 2024 05:29:35 +0000 (22:29 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 21 Jun 2024 19:12:53 +0000 (19:12 +0000)
commitd73a8a206a7d3c179cdc498a29be215fa48a1ec2
treea78e861a73cfc28b3b58e2b5a006b62e622cf659
parent1b4f1dc95d221c1e9d0afb9067fd6a09f12dd061
cmd/cgo: fail on v, err := C.fn when fn is a builtin function

We were already checking for _CMalloc, but in fact none of the
builtin functions support returning an error.

Fixes #67707

Change-Id: I0ee432a9f13ace472c3f36f641efc7d18eda0631
Reviewed-on: https://go-review.googlesource.com/c/go/+/589575
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/cgo/gcc.go
src/cmd/cgo/internal/testerrors/errors_test.go
src/cmd/cgo/internal/testerrors/testdata/issue67707.go [new file with mode: 0644]