Skip to content

Commit f4ca3c1

Browse files
committed
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 <[email protected]> Run-TryBot: Cherry Zhang <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 8f81625 commit f4ca3c1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/runtime/signal_unix.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,13 @@ func sigpipe() {
280280
//
281281
//go:nosplit
282282
func sigFetchG(c *sigctxt) *g {
283-
switch GOARCH {
284-
case "arm", "arm64", "ppc64", "ppc64le":
285-
if inVDSOPage(c.sigpc()) {
286-
return nil
287-
}
288-
}
289-
return getg()
283+
switch GOARCH {
284+
case "arm", "arm64":
285+
if inVDSOPage(c.sigpc()) {
286+
return nil
287+
}
288+
}
289+
return getg()
290290
}
291291

292292
// sigtrampgo is called from the signal handler function, sigtramp,

0 commit comments

Comments
 (0)