aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_freebsd_arm.s
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2015-07-21 22:34:48 -0700
committerIan Lance Taylor <iant@golang.org>2015-07-22 20:26:29 +0000
commit872b168fe344914550c29b4f1b0cac9f2e70e7fc (patch)
treee877af2c1cd05cbeecc98224b21edb66123879de /src/runtime/sys_freebsd_arm.s
parent428ed1e3d9e31428b3bf81ed55664a4c34238e4c (diff)
downloadgo-872b168fe344914550c29b4f1b0cac9f2e70e7fc.tar.gz
go-872b168fe344914550c29b4f1b0cac9f2e70e7fc.zip
runtime: if we don't handle a signal on a non-Go thread, raise it
In the past badsignal would crash the program. In https://golang.org/cl/10757044 badsignal was changed to call sigsend, to fix issue #3250. The effect of this was that when a non-Go thread received a signal, and os/signal.Notify was not being used to check for occurrences of the signal, the signal was ignored. This changes the code so that if os/signal.Notify is not being used, then the signal handler is reset to what it was, and the signal is raised again. This lets non-Go threads handle the signal as they wish. In particular, it means that a segmentation violation in a non-Go thread will ordinarily crash the process, as it should. Fixes #10139. Update #11794. Change-Id: I2109444aaada9d963ad03b1d071ec667760515e5 Reviewed-on: https://go-review.googlesource.com/12503 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/sys_freebsd_arm.s')
-rw-r--r--src/runtime/sys_freebsd_arm.s6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/sys_freebsd_arm.s b/src/runtime/sys_freebsd_arm.s
index 3dd04cf973..298900c9a2 100644
--- a/src/runtime/sys_freebsd_arm.s
+++ b/src/runtime/sys_freebsd_arm.s
@@ -327,9 +327,9 @@ TEXT runtime·osyield(SB),NOSPLIT,$-4
RET
TEXT runtime·sigprocmask(SB),NOSPLIT,$0
- MOVW $3, R0 // arg 1 - how (SIG_SETMASK)
- MOVW new+0(FP), R1 // arg 2 - set
- MOVW old+4(FP), R2 // arg 3 - oset
+ MOVW how+0(FP), R0 // arg 1 - how
+ MOVW new+4(FP), R1 // arg 2 - set
+ MOVW old+8(FP), R2 // arg 3 - oset
MOVW $SYS_sigprocmask, R7
SWI $0
MOVW.CS $0, R8 // crash on syscall failure