]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.5] runtime: fix bad signal stack when using cgo-created threads...
authorRuss Cox <rsc@golang.org>
Fri, 13 Nov 2015 21:21:01 +0000 (16:21 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 23 Nov 2015 02:01:28 +0000 (02:01 +0000)
commit22469232670870cfd96fd257f3b99f6b649b0b4f
tree5e2dc8cff045aea7df8a792681c02c767e42c493
parent61e1caee5b3a79f8986248541839eb15d311a3a9
[release-branch.go1.5] runtime: fix bad signal stack when using cgo-created threads and async signals

Cgo-created threads transition between having associated Go g's and m's and not.
A signal arriving during the transition could think it was safe and appropriate to
run Go signal handlers when it was in fact not.
Avoid the race by masking all signals during the transition.

Fixes #12277.

Change-Id: Ie9711bc1d098391d58362492197a7e0f5b497d14
Reviewed-on: https://go-review.googlesource.com/16915
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/17141
src/runtime/os1_darwin.go
src/runtime/os1_dragonfly.go
src/runtime/os1_freebsd.go
src/runtime/os1_linux.go
src/runtime/os1_nacl.go
src/runtime/os1_netbsd.go
src/runtime/os1_openbsd.go
src/runtime/os1_plan9.go
src/runtime/os1_windows.go
src/runtime/os3_solaris.go
src/runtime/proc1.go