]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: testprogcgo: don't call exported Go functions directly from Go
authorIan Lance Taylor <iant@golang.org>
Fri, 11 Jun 2021 18:50:42 +0000 (11:50 -0700)
committerIan Lance Taylor <iant@golang.org>
Sat, 12 Jun 2021 16:07:12 +0000 (16:07 +0000)
commit1ed0d129e9ba9b55e9ae36ac1d7f2766ba16b373
tree6a5b81781559c818cc2b0c8750c5424448cdd2d3
parent9d46ee5ac4acd6602692f70c5149a3f6db058558
runtime: testprogcgo: don't call exported Go functions directly from Go

Instead route through a C function, to avoid declaration conflicts
between the declaration needed in the cgo comment and the declaration
generated by cgo in _cgo_export.h.

This is not something user code will ever do, so no need to make it
work in cgo.

Fixes #46502

Change-Id: I1bfffdc76ef8ea63e3829871298d0774157957a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/327309
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/runtime/testdata/testprogcgo/aprof.go
src/runtime/testdata/testprogcgo/aprof_c.c [new file with mode: 0644]
src/runtime/testdata/testprogcgo/bigstack1_windows.c [new file with mode: 0644]
src/runtime/testdata/testprogcgo/bigstack_windows.go