aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_386.s
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2022-04-26 14:42:34 -0400
committerGopher Robot <gobot@golang.org>2022-04-28 16:29:07 +0000
commit4bb45f7549548add8222aa4f3040d0e2120691a9 (patch)
tree7fc3617f18c4ffdbba55f0f63a6f9ea9cfeb7f3e /src/runtime/sys_linux_386.s
parent17371eea25f203575389f85b33ddb58792d25e84 (diff)
downloadgo-4bb45f7549548add8222aa4f3040d0e2120691a9.tar.xz
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 <austin@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime/sys_linux_386.s')
-rw-r--r--src/runtime/sys_linux_386.s2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/sys_linux_386.s b/src/runtime/sys_linux_386.s
index fef68d51dc..4942f21e4f 100644
--- a/src/runtime/sys_linux_386.s
+++ b/src/runtime/sys_linux_386.s
@@ -433,7 +433,7 @@ TEXT runtime·sigfwd(SB),NOSPLIT,$12-16
RET
// Called using C ABI.
-TEXT runtime·sigtramp(SB),NOSPLIT,$28
+TEXT runtime·sigtramp(SB),NOSPLIT|TOPFRAME,$28
// Save callee-saved C registers, since the caller may be a C signal handler.
MOVL BX, bx-4(SP)
MOVL BP, bp-8(SP)