aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <joel@sing.id.au>2016-05-09 02:13:03 +1000
committerJoel Sing <joel@sing.id.au>2017-10-02 16:14:49 +0000
commitee88852fc1e721a71d15bd477e3cc6df904b5f78 (patch)
treedcca702a3f9682543e4d6c569b16a37398e8c2e0
parenta212494fc1ba9557e09c3e15398c30bc1b5bc16a (diff)
downloadgo-ee88852fc1e721a71d15bd477e3cc6df904b5f78.tar.gz
go-ee88852fc1e721a71d15bd477e3cc6df904b5f78.zip
[release-branch.go1.4] runtime: stop using sigreturn on openbsd/386
In future releases of OpenBSD, the sigreturn syscall will no longer exist. As such, stop using sigreturn on openbsd/386 and just return from the signal trampoline. This is a backport of https://golang.org/cl/23024 to the Go 1.4 branch. Updates #20672 Change-Id: Ia1caf9427c51a6871f51dbff06720f3158e38c68 Reviewed-on: https://go-review.googlesource.com/66071 Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--src/runtime/sys_openbsd_386.s11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/runtime/sys_openbsd_386.s b/src/runtime/sys_openbsd_386.s
index 5cda7768ae..b9067871cd 100644
--- a/src/runtime/sys_openbsd_386.s
+++ b/src/runtime/sys_openbsd_386.s
@@ -186,7 +186,7 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$44
MOVL BX, 0(SP)
MOVL $runtime·badsignal(SB), AX
CALL AX
- JMP sigtramp_ret
+ RET
// save g
MOVL DI, 20(SP)
@@ -211,15 +211,6 @@ TEXT runtime·sigtramp(SB),NOSPLIT,$44
get_tls(CX)
MOVL 20(SP), BX
MOVL BX, g(CX)
-
-sigtramp_ret:
- // call sigreturn
- MOVL context+8(FP), AX
- MOVL $0, 0(SP) // syscall gap
- MOVL AX, 4(SP) // arg 1 - sigcontext
- MOVL $103, AX // sys_sigreturn
- INT $0x80
- MOVL $0xf1, 0xf1 // crash
RET
// int32 tfork(void *param, uintptr psize, M *mp, G *gp, void (*fn)(void));