]> Cypherpunks repositories - gostls13.git/commit
runtime/cgo: return correct sa_flags
authorBryan C. Mills <bcmills@google.com>
Tue, 7 Mar 2017 23:50:52 +0000 (18:50 -0500)
committerBryan Mills <bcmills@google.com>
Thu, 9 Mar 2017 18:53:35 +0000 (18:53 +0000)
commit4210930a2861c8938baabaa5b8097e8b28d92934
treed028c07c5bcbe9191ce1a6dcf240843741f1660a
parente57350f4c091c80333d37b2ba5af50de193147fa
runtime/cgo: return correct sa_flags

A typo in the previous revision ("act" instead of "oldact") caused us
to return the sa_flags from the new (or zeroed) sigaction rather than
the old one.

In the presence of a signal handler registered before
runtime.libpreinit, this caused setsigstack to erroneously zero out
important sa_flags (such as SA_SIGINFO) in its attempt to re-register
the existing handler with SA_ONSTACK.

Change-Id: I3cd5152a38ec0d44ae611f183bc1651d65b8a115
Reviewed-on: https://go-review.googlesource.com/37852
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/testsanitizers/test.bash
misc/cgo/testsanitizers/tsan_shared.go [new file with mode: 0644]
src/runtime/cgo/gcc_sigaction.c