]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: mark sigtramp as TOPFRAME
authorMichael Pratt <mpratt@google.com>
Tue, 26 Apr 2022 18:42:34 +0000 (14:42 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 28 Apr 2022 16:29:07 +0000 (16:29 +0000)
commit4bb45f7549548add8222aa4f3040d0e2120691a9
tree7fc3617f18c4ffdbba55f0f63a6f9ea9cfeb7f3e
parent17371eea25f203575389f85b33ddb58792d25e84
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>
src/runtime/sys_linux_386.s
src/runtime/sys_linux_amd64.s
src/runtime/sys_linux_arm.s
src/runtime/sys_linux_arm64.s
src/runtime/sys_linux_mips64x.s
src/runtime/sys_linux_mipsx.s
src/runtime/sys_linux_ppc64x.s
src/runtime/sys_linux_riscv64.s
src/runtime/sys_linux_s390x.s