runtime: don't crash if signal handler info argument is nil
commitcccf7f101ef0129f8494c0fe2f5d08f0cd5cea88
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Nov 2016 23:16:04 +0000 (14 23:16 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Nov 2016 23:16:04 +0000 (14 23:16 +0000)
treeb5ec8e784225739b75eaacc89ac8e28611847abf
parent17515fad4880e3406bc2334b88700f800f93a1be
runtime: don't crash if signal handler info argument is nil

    Apparently on Solaris 10 a SA_SIGINFO signal handler can be invoked with
    a nil info argument.  I would not have believed it but I've now seen it
    happen, and the sigaction man page actually says "If the second argument
    is not equal to NULL, it points to a siginfo_t structure...."  So, if
    that happens, don't crash.

    Also fix another case where we want to make sure that &T{} does not
    allocate.

    Reviewed-on: https://go-review.googlesource.com/33150

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242403 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
libgo/go/runtime/signal_gccgo.go
libgo/go/runtime/signal_sigtramp.go
libgo/runtime/go-signal.c