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/99415
Reviewed-by: Austin Clements <austin@google.com>
//go:nosplit
func sysSigaction(sig uint32, new, old *sigactiont) {
if rt_sigaction(uintptr(sig), new, old, unsafe.Sizeof(sigactiont{}.sa_mask)) != 0 {
- throw("sigaction failed")
+ // Use system stack to avoid split stack overflow on ppc64/ppc64le.
+ systemstack(func() {
+ throw("sigaction failed")
+ })
}
}