From 49b017fe59bf628795f2c4fdbcb5db942e865fa9 Mon Sep 17 00:00:00 2001 From: George Tsilias Date: Thu, 4 Jun 2020 23:11:56 +0300 Subject: [PATCH] runtime: handle signal 34 for musl setgid 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 TryBot-Result: Go Bot Trust: Tobias Klauser Reviewed-by: Ian Lance Taylor --- src/runtime/sigtab_linux_generic.go | 2 +- src/runtime/sigtab_linux_mipsx.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/sigtab_linux_generic.go b/src/runtime/sigtab_linux_generic.go index b26040b803..38d686544f 100644 --- a/src/runtime/sigtab_linux_generic.go +++ b/src/runtime/sigtab_linux_generic.go @@ -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"}, diff --git a/src/runtime/sigtab_linux_mipsx.go b/src/runtime/sigtab_linux_mipsx.go index 81dd2314c5..51ef470ce7 100644 --- a/src/runtime/sigtab_linux_mipsx.go +++ b/src/runtime/sigtab_linux_mipsx.go @@ -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"}, -- 2.50.0