From 4bb45f7549548add8222aa4f3040d0e2120691a9 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Tue, 26 Apr 2022 14:42:34 -0400 Subject: runtime: mark sigtramp as TOPFRAME Currently throw() in the signal handler results in "fatal error: unknown return pc from runtime.sigreturn ...". Marking sigtramp as TOPFRAME allows gentraceback to stop tracebacks at the end of a signal handler, since there is not much beyond sigtramp. This is just done on Linux for now, but may apply to other Unix systems as well. Change-Id: I96edcb945283f417a5bfe00ce2fb2b1a0d578692 Reviewed-on: https://go-review.googlesource.com/c/go/+/402190 Reviewed-by: Austin Clements Run-TryBot: Michael Pratt Auto-Submit: Michael Pratt TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui --- src/runtime/sys_linux_arm.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/sys_linux_arm.s') diff --git a/src/runtime/sys_linux_arm.s b/src/runtime/sys_linux_arm.s index 201940b4e6..66bf40328e 100644 --- a/src/runtime/sys_linux_arm.s +++ b/src/runtime/sys_linux_arm.s @@ -566,7 +566,7 @@ TEXT runtime·sigfwd(SB),NOSPLIT,$0-16 MOVW R4, R13 RET -TEXT runtime·sigtramp(SB),NOSPLIT,$0 +TEXT runtime·sigtramp(SB),NOSPLIT|TOPFRAME,$0 // Reserve space for callee-save registers and arguments. MOVM.DB.W [R4-R11], (R13) SUB $16, R13 -- cgit v1.3-5-g45d5