]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: handle signal 34 for musl setgid
authorGeorge Tsilias <tsiliasg@gmail.com>
Thu, 4 Jun 2020 20:11:56 +0000 (23:11 +0300)
committerIan Lance Taylor <iant@golang.org>
Wed, 28 Oct 2020 00:48:22 +0000 (00:48 +0000)
It has been observed that setgid hangs when using cgo with musl.
This fix ensures that signal 34 gets handled in an appropriate way,
like signal 33 when using glibc.

Fixes #39343

Change-Id: I89565663e2c361f62cbccfe80aaedf290bd58d57
Reviewed-on: https://go-review.googlesource.com/c/go/+/236518
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/sigtab_linux_generic.go
src/runtime/sigtab_linux_mipsx.go

index b26040b80317dbb98972db8835f1993a18171def..38d686544fde9b6b93505ad56bae6594594e4757 100644 (file)
@@ -45,7 +45,7 @@ var sigtable = [...]sigTabT{
        /* 31 */ {_SigThrow, "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"},
+       /* 34 */ {_SigSetStack + _SigUnblock, "signal 34"}, /* musl SIGSYNCCALL; see issue 39343 */
        /* 35 */ {_SigNotify, "signal 35"},
        /* 36 */ {_SigNotify, "signal 36"},
        /* 37 */ {_SigNotify, "signal 37"},
index 81dd2314c566105278b2a0e8acf57874fec695a5..51ef470ce7ac1ed27e89808e6cef9eaf4d17bc9e 100644 (file)
@@ -42,7 +42,7 @@ var sigtable = [...]sigTabT{
        /*  31 */ {_SigNotify, "SIGXFSZ: file size limit exceeded"},
        /*  32 */ {_SigSetStack + _SigUnblock, "signal 32"}, /* SIGCANCEL; see issue 6997 */
        /*  33 */ {_SigSetStack + _SigUnblock, "signal 33"}, /* SIGSETXID; see issues 3871, 9400, 12498 */
-       /*  34 */ {_SigNotify, "signal 34"},
+       /*  34 */ {_SigSetStack + _SigUnblock, "signal 34"}, /* musl SIGSYNCCALL; see issue 39343 */
        /*  35 */ {_SigNotify, "signal 35"},
        /*  36 */ {_SigNotify, "signal 36"},
        /*  37 */ {_SigNotify, "signal 37"},