1
0
mirror of https://github.com/golang/go synced 2024-09-29 14:24:32 -06:00
go/misc/cgo
Ian Lance Taylor be1ef46775 runtime: add optional expensive check for invalid cgo pointer passing
If you set GODEBUG=cgocheck=2 the runtime package will use the write
barrier to detect cases where a Go program writes a Go pointer into
non-Go memory.  In conjunction with the existing cgo checks, and the
not-yet-implemented cgo check for exported functions, this should
reliably detect all cases (that do not import the unsafe package) in
which a Go pointer is incorrectly shared with C code.  This check is
optional because it turns on the write barrier at all times, which is
known to be expensive.

Update #12416.

Change-Id: I549d8b2956daa76eac853928e9280e615d6365f4
Reviewed-on: https://go-review.googlesource.com/16899
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-16 18:39:06 +00:00
..
errors runtime: add optional expensive check for invalid cgo pointer passing 2015-11-16 18:39:06 +00:00
gmp Fix several out of date references to 4g/5g/6g/8g/9g. 2015-06-26 03:38:21 +00:00
life
nocgo cmd/ld: really import runtime/cgo for external link 2014-05-20 21:36:50 -07:00
stdio
test cmd/link, cmd/go, cmd/dist: use copy of libgcc.a for internal linking 2015-11-14 18:56:17 +00:00
testasan runtime: more flexible heap memory mapping on 64-bits 2013-06-12 18:47:16 +04:00
testcarchive cmd/go: install headers for c-archive/c-shared cgo exports 2015-05-07 17:39:56 +00:00
testcshared cmd/go: buildmode=c-shared support for linux/arm64 2015-10-29 16:25:37 +00:00
testgodefs build: convert run.bash, run.bat, and run.rc into a Go program 2015-03-03 23:22:11 +00:00
testsanitizers runtime: don't call msanread when running on the system stack 2015-11-11 06:04:04 +00:00
testshared cmd/dist, cmd/go, misc/cgo/testshared: update testshared and run it on arm 2015-11-10 19:57:30 +00:00
testsigfwd runtime: signal forwarding 2015-04-24 05:19:39 +00:00
testso cmd/dist: convert testso test into Go 2015-06-12 04:33:50 +00:00
testsovar misc/cgo/testsovar: needs the extern keyword to export variables on non-windows platforms 2015-07-21 18:10:57 +00:00
testtls misc/cgo/testtls: make test less flaky 2014-01-21 19:44:51 -05:00