summaryrefslogtreecommitdiff
path: root/src/runtime/sys_darwin_arm64.s
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2015-12-21 22:27:01 -0800
committerIan Lance Taylor <iant@golang.org>2015-12-24 17:00:04 +0000
commitf7e51c132059a78953b768ca66e457b40985930e (patch)
treee83f12442cc839b5f2d80c14c3b7131666bc9746 /src/runtime/sys_darwin_arm64.s
parente4dcf5c8c22d98ac9eac7b9b226596229624cb1d (diff)
downloadgo-git-f7e51c132059a78953b768ca66e457b40985930e.tar.gz
runtime: adjust gsignal stack to current signal stack
If non-Go code calls sigaltstack before a signal is received, use sigaltstack to determine the current signal stack and set the gsignal stack to use it. This makes the Go runtime more robust in the face of non-Go code. We still can't handle a disabled signal stack or a signal triggered with SA_ONSTACK clear, but we now give clear errors for those cases. Fixes #7227. Update #9896. Change-Id: Icb1607e01fd6461019b6d77d940e59b3aed4d258 Reviewed-on: https://go-review.googlesource.com/18102 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Diffstat (limited to 'src/runtime/sys_darwin_arm64.s')
-rw-r--r--src/runtime/sys_darwin_arm64.s8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/sys_darwin_arm64.s b/src/runtime/sys_darwin_arm64.s
index 145674d844..d0034d5a33 100644
--- a/src/runtime/sys_darwin_arm64.s
+++ b/src/runtime/sys_darwin_arm64.s
@@ -180,6 +180,14 @@ TEXT runtime·nanotime(SB),NOSPLIT,$40
MOVD R0, ret+0(FP)
RET
+TEXT runtime·sigfwd(SB),NOSPLIT,$0-32
+ MOVW sig+8(FP), R0
+ MOVD info+16(FP), R1
+ MOVD ctx+24(FP), R2
+ MOVD fn+0(FP), R11
+ BL (R11)
+ RET
+
// Sigtramp's job is to call the actual signal handler.
// It is called with the following arguments on the stack:
// LR "return address" - ignored