aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/signal_unix.go
diff options
context:
space:
mode:
authorLynn Boger <laboger@linux.vnet.ibm.com>2019-09-20 10:51:32 -0400
committerLynn Boger <laboger@linux.vnet.ibm.com>2019-09-23 19:16:16 +0000
commitf4ca3c1e0a2066ca4f7bd6203866d282ed34acf2 (patch)
tree320209f84e91990f1252c38c71a706d3d2db5d9c /src/runtime/signal_unix.go
parent8f816259eea991fc354fe44add5223e9ee6b9d67 (diff)
downloadgo-f4ca3c1e0a2066ca4f7bd6203866d282ed34acf2.tar.gz
go-f4ca3c1e0a2066ca4f7bd6203866d282ed34acf2.zip
runtime: fix regression on ppc64x from CL 192937
This fixes a regression introduced with CL 192937. That change was intended to fix a problem in arm and arm64 but also added code to change the behavior in ppc64 and ppc64le even though the error never occurred there. The change to function sigFetchG assumes that the register holding 'g' could be clobbered by vdso code when in fact 'g' is in R30 and that is nonvolatile in the 64-bit PowerPC ELF ABI so would not be clobbered in vdso code. So if this happens somehow the path it takes is incorrect, falling through to a call to badsignal which doesn't seem right. This regression caused intermittent hangs on the builder dashboard for ppc64, and can be reproduced consistently when running os/signal TestStress on some ppc64 systems. I mentioned this problem is issue #34391 because I thought it was related to another problem described there. Change-Id: I2ee3606de302bafe509d300077ce3b44b88571a1 Reviewed-on: https://go-review.googlesource.com/c/go/+/196658 Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/signal_unix.go')
-rw-r--r--src/runtime/signal_unix.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go
index c9f57a7ba4..6a8b5b7ace 100644
--- a/src/runtime/signal_unix.go
+++ b/src/runtime/signal_unix.go
@@ -280,13 +280,13 @@ func sigpipe() {
//
//go:nosplit
func sigFetchG(c *sigctxt) *g {
- switch GOARCH {
- case "arm", "arm64", "ppc64", "ppc64le":
- if inVDSOPage(c.sigpc()) {
- return nil
- }
- }
- return getg()
+ switch GOARCH {
+ case "arm", "arm64":
+ if inVDSOPage(c.sigpc()) {
+ return nil
+ }
+ }
+ return getg()
}
// sigtrampgo is called from the signal handler function, sigtramp,