aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_darwin_amd64.s
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-11-27 00:42:41 -0500
committerCherry Zhang <cherryyz@google.com>2020-11-30 22:14:36 +0000
commit7f688d18c0ae6df3e895d21799b8ece7d5941293 (patch)
tree3dc79202b2267040ee7f7d6fea933466ade45986 /src/runtime/sys_darwin_amd64.s
parentd2b436d95d99cb3ff587bf0d2e893a8d027f8292 (diff)
downloadgo-7f688d18c0ae6df3e895d21799b8ece7d5941293.tar.gz
go-7f688d18c0ae6df3e895d21799b8ece7d5941293.zip
runtime: mlock signal stack on macOS/ARM64
Apparently, the macOS ARM64 kernel has a bug where when a signal arrives and the signal stack is not currently faulted in, it may kill the program with a SIGILL. Work around it by mlock the signal stacks. Fixes #42774. Change-Id: I99a4b3fdb6d8af1c945725ddc2c25568d81c510a Reviewed-on: https://go-review.googlesource.com/c/go/+/273686 Trust: Cherry Zhang <cherryyz@google.com> Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/runtime/sys_darwin_amd64.s')
-rw-r--r--src/runtime/sys_darwin_amd64.s3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/sys_darwin_amd64.s b/src/runtime/sys_darwin_amd64.s
index 129e1e1a96..9b5b23901d 100644
--- a/src/runtime/sys_darwin_amd64.s
+++ b/src/runtime/sys_darwin_amd64.s
@@ -105,6 +105,9 @@ TEXT runtime·madvise_trampoline(SB), NOSPLIT, $0
POPQ BP
RET
+TEXT runtime·mlock_trampoline(SB), NOSPLIT, $0
+ UNDEF // unimplemented
+
GLOBL timebase<>(SB),NOPTR,$(machTimebaseInfo__size)
TEXT runtime·nanotime_trampoline(SB),NOSPLIT,$0