]> Cypherpunks repositories - gostls13.git/commit
runtime: don't crash if signal delivered on g0 stack
authorIan Lance Taylor <iant@golang.org>
Fri, 9 Dec 2016 01:39:00 +0000 (17:39 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 12 Dec 2016 19:19:59 +0000 (19:19 +0000)
commitfded5dbb2f51d1c24d1541076b143929cdc988af
treea21887446a0c447b5b2da51673e0fe46be57e518
parent265e547658ac6e91df308326041ea462593053fc
runtime: don't crash if signal delivered on g0 stack

Also, if we changed the gsignal stack to match the stack we are
executing on, restore it when returning from the signal handler, for
safety.

Fixes #18255.

Change-Id: Ic289b36e4e38a56f8a6d4b5d74f68121c242e81a
Reviewed-on: https://go-review.googlesource.com/34239
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
misc/cgo/testsanitizers/test.bash
misc/cgo/testsanitizers/tsan9.go [new file with mode: 0644]
src/runtime/signal_unix.go