]> Cypherpunks repositories - gostls13.git/commit
cgo, runtime: diagnose callback on non-Go thread
authorRuss Cox <rsc@golang.org>
Thu, 8 Mar 2012 17:12:40 +0000 (12:12 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 8 Mar 2012 17:12:40 +0000 (12:12 -0500)
commit9b73238daa6a5d08eb2265fc38577cb6003f0d23
tree00d9bf92376ea354da9b197fb6c3a60f1517e5da
parent9b7b574edcff14d916215a72b7a9fc8bb82ab16e
cgo, runtime: diagnose callback on non-Go thread

Before:
$ go run x.go
signal 11 (core dumped)
$

After:
$ go run x.go
runtime: cgo callback on thread not created by Go.
signal 11 (core dumped)
$

For issue 3068.
Not a fix, but as much of a fix as we can do before Go 1.

R=golang-dev, rogpeppe, gri
CC=golang-dev
https://golang.org/cl/5781047
src/cmd/cgo/out.go
src/pkg/runtime/asm_386.s
src/pkg/runtime/asm_amd64.s
src/pkg/runtime/thread_darwin.c
src/pkg/runtime/thread_freebsd.c
src/pkg/runtime/thread_linux.c
src/pkg/runtime/thread_netbsd.c
src/pkg/runtime/thread_openbsd.c
src/pkg/runtime/thread_plan9.c
src/pkg/runtime/thread_windows.c