Commit 3d69ef37 authored by Ian Lance Taylor's avatar Ian Lance Taylor

runtime: use systemstack around throw in sysSigaction

Try to fix the build on ppc64-linux and ppc64le-linux, avoiding:

--- FAIL: TestInlinedRoutineRecords (2.12s)
	dwarf_test.go:97: build: # command-line-arguments
		runtime.systemstack: nosplit stack overflow
			752	assumed on entry to runtime.sigtrampgo (nosplit)
			480	after runtime.sigtrampgo (nosplit) uses 272
			400	after runtime.sigfwdgo (nosplit) uses 80
			264	after runtime.setsig (nosplit) uses 136
			208	after runtime.sigaction (nosplit) uses 56
			136	after runtime.sysSigaction (nosplit) uses 72
			88	after runtime.throw (nosplit) uses 48
			16	after runtime.dopanic (nosplit) uses 72
			-16	after runtime.systemstack (nosplit) uses 32

	dwarf_test.go:98: build error: exit status 2
--- FAIL: TestAbstractOriginSanity (10.22s)
	dwarf_test.go:97: build: # command-line-arguments
		runtime.systemstack: nosplit stack overflow
			752	assumed on entry to runtime.sigtrampgo (nosplit)
			480	after runtime.sigtrampgo (nosplit) uses 272
			400	after runtime.sigfwdgo (nosplit) uses 80
			264	after runtime.setsig (nosplit) uses 136
			208	after runtime.sigaction (nosplit) uses 56
			136	after runtime.sysSigaction (nosplit) uses 72
			88	after runtime.throw (nosplit) uses 48
			16	after runtime.dopanic (nosplit) uses 72
			-16	after runtime.systemstack (nosplit) uses 32

	dwarf_test.go:98: build error: exit status 2
FAIL
FAIL	cmd/link/internal/ld	13.404s

Change-Id: I4840604adb0e9f68a8d8e24f2f2a1a17d1634a58
Reviewed-on: https://go-review.googlesource.com/99415Reviewed-by: default avatarAustin Clements <austin@google.com>
parent 3772b2e1
...@@ -414,7 +414,10 @@ func (c *sigctxt) fixsigcode(sig uint32) { ...@@ -414,7 +414,10 @@ func (c *sigctxt) fixsigcode(sig uint32) {
//go:nosplit //go:nosplit
func sysSigaction(sig uint32, new, old *sigactiont) { func sysSigaction(sig uint32, new, old *sigactiont) {
if rt_sigaction(uintptr(sig), new, old, unsafe.Sizeof(sigactiont{}.sa_mask)) != 0 { if rt_sigaction(uintptr(sig), new, old, unsafe.Sizeof(sigactiont{}.sa_mask)) != 0 {
// Use system stack to avoid split stack overflow on ppc64/ppc64le.
systemstack(func() {
throw("sigaction failed") throw("sigaction failed")
})
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment