]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: updated SIGSYS to cause a panic + stacktrace
authorJulia Hansbrough <flowerhack@google.com>
Mon, 18 Apr 2016 22:53:29 +0000 (15:53 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 19 Apr 2016 22:48:31 +0000 (22:48 +0000)
On GNU/Linux, SIGSYS is specified to cause the process to terminate
without a core dump. In https://codereview.appspot.com/3749041 , it
appears that Golang accidentally introduced incorrect behavior for
this signal, which caused Golang processes to keep running after
receiving SIGSYS. This change reverts it to the old/correct behavior.

Updates #15204

Change-Id: I3aa48a9499c1bc36fa5d3f40c088fdd7599e0db5
Reviewed-on: https://go-review.googlesource.com/22202
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/sigtab_linux_generic.go
src/runtime/sigtab_linux_mips64x.go

index 32c40c4768eb2722159f133ed15e136032f4b6ff..e97497f18c6c885a94c2aba8ed7174e01d859789 100644 (file)
@@ -45,7 +45,7 @@ var sigtable = [...]sigTabT{
        /* 28 */ {_SigNotify, "SIGWINCH: window size change"},
        /* 29 */ {_SigNotify, "SIGIO: i/o now possible"},
        /* 30 */ {_SigNotify, "SIGPWR: power failure restart"},
-       /* 31 */ {_SigNotify, "SIGSYS: bad system call"},
+       /* 31 */ {_SigThrow + _SigUnblock, "SIGSYS: bad system call"},
        /* 32 */ {_SigSetStack + _SigUnblock, "signal 32"}, /* SIGCANCEL; see issue 6997 */
        /* 33 */ {_SigSetStack + _SigUnblock, "signal 33"}, /* SIGSETXID; see issues 3871, 9400, 12498 */
        /* 34 */ {_SigNotify, "signal 34"},
index dbd50f7b1f62b2cfd09d00d2c0dbffa35c5bda76..f7d81811bacd9b685f048c75f20506d1649e3cbf 100644 (file)
@@ -25,7 +25,7 @@ var sigtable = [...]sigTabT{
        /* 9 */ {0, "SIGKILL: kill"},
        /* 10 */ {_SigPanic + _SigUnblock, "SIGBUS: bus error"},
        /* 11 */ {_SigPanic + _SigUnblock, "SIGSEGV: segmentation violation"},
-       /* 12 */ {_SigNotify, "SIGSYS: bad system call"},
+       /* 12 */ {_SigThrow + _SigUnblock, "SIGSYS: bad system call"},
        /* 13 */ {_SigNotify, "SIGPIPE: write to broken pipe"},
        /* 14 */ {_SigNotify, "SIGALRM: alarm clock"},
        /* 15 */ {_SigNotify + _SigKill, "SIGTERM: termination"},