aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os_darwin.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-09-12 12:33:24 -0400
committerCherry Zhang <cherryyz@google.com>2020-10-06 21:25:42 +0000
commit28e549dec3954b36d0c83442be913d8709d7e5ae (patch)
tree2c147b877df8c32fd1715cf9443937f8dc80a72f /src/runtime/os_darwin.go
parent04c7e32517faf6257986e7c4cdd3f5f03eeae37b (diff)
downloadgo-28e549dec3954b36d0c83442be913d8709d7e5ae.tar.gz
go-28e549dec3954b36d0c83442be913d8709d7e5ae.zip
runtime: use sigaltstack on macOS/ARM64
Currently we don't use sigaltstack on darwin/arm64, as is not supported on iOS. However, it is supported on macOS. Use it. (iOS remains unchanged.) Change-Id: Icc154c5e2edf2dbdc8ca68741ad9157fc15a72ee Reviewed-on: https://go-review.googlesource.com/c/go/+/256917 Trust: Cherry Zhang <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/os_darwin.go')
-rw-r--r--src/runtime/os_darwin.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/os_darwin.go b/src/runtime/os_darwin.go
index 01c40b4813..394bd6fb0f 100644
--- a/src/runtime/os_darwin.go
+++ b/src/runtime/os_darwin.go
@@ -289,9 +289,9 @@ func mpreinit(mp *m) {
// Called to initialize a new m (including the bootstrap m).
// Called on the new thread, cannot allocate memory.
func minit() {
- // The alternate signal stack is buggy on arm64.
+ // iOS does not support alternate signal stack.
// The signal handler handles it directly.
- if GOARCH != "arm64" {
+ if !(GOOS == "ios" && GOARCH == "arm64") {
minitSignalStack()
}
minitSignalMask()
@@ -301,9 +301,9 @@ func minit() {
// Called from dropm to undo the effect of an minit.
//go:nosplit
func unminit() {
- // The alternate signal stack is buggy on arm64.
+ // iOS does not support alternate signal stack.
// See minit.
- if GOARCH != "arm64" {
+ if !(GOOS == "ios" && GOARCH == "arm64") {
unminitSignals()
}
}