Skip to content

Commit 7d80a2e

Browse files
author
Elias Naur
committed
runtime: allow crash() to raise SIGABRT on darwin/arm64
To avoid gigantic core dumps, the runtime avoids raising SIGABRT on crashes on 64-bit Darwin systems. Mobile OS'es (probably) don't generate huge core dumps, so to aid crash reporters, allow SIGABRT on crashes on darwin/arm64. Change-Id: I4a29608f400967d76f9bd0643fea22244c2da9df Reviewed-on: https://go-review.googlesource.com/49770 Run-TryBot: Elias Naur <[email protected]> Reviewed-by: Avelino <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent c9f8a6c commit 7d80a2e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/runtime/signal_unix.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ package runtime
88

99
import (
1010
"runtime/internal/atomic"
11-
"runtime/internal/sys"
1211
"unsafe"
1312
)
1413

@@ -474,7 +473,7 @@ func crash() {
474473
// this means the OS X core file will be >128 GB and even on a zippy
475474
// workstation can take OS X well over an hour to write (uninterruptible).
476475
// Save users from making that mistake.
477-
if sys.PtrSize == 8 {
476+
if GOARCH == "amd64" {
478477
return
479478
}
480479
}

0 commit comments

Comments
 (0)