]> Cypherpunks repositories - gostls13.git/commit
runtime: fix 386 signal handler bug
authorRuss Cox <rsc@golang.org>
Sat, 12 Jun 2010 17:48:04 +0000 (10:48 -0700)
committerRuss Cox <rsc@golang.org>
Sat, 12 Jun 2010 17:48:04 +0000 (10:48 -0700)
commit53a529ab2b8ef0616b5baf5f04e673e046e8e36c
tree58dd5238630ae1593c33786f4a82563cf053b324
parent9d72aaabda66222cdf630423ec36a6efa2ce4121
runtime: fix 386 signal handler bug

Cannot assume that g == m->curg at time of signal.
Must save actual g and restore.

Fixes flaky crashes with messages like

throw: malloc mlookup
throw: malloc/free - deadlock
throw: unwindstack on self
throw: free mlookup

(and probably others) when running cgo.

R=iant
CC=golang-dev
https://golang.org/cl/1648043
src/pkg/runtime/darwin/386/sys.s
src/pkg/runtime/linux/386/sys.s