]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: allow crash() to raise SIGABRT on darwin/arm64
authorElias Naur <elias.naur@gmail.com>
Tue, 18 Jul 2017 22:09:35 +0000 (00:09 +0200)
committerElias Naur <elias.naur@gmail.com>
Thu, 10 Aug 2017 10:07:36 +0000 (10:07 +0000)
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 <elias.naur@gmail.com>
Reviewed-by: Avelino <t@avelino.xxx>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/signal_unix.go

index 539b165ba1c6cd458c06841e631482af9b3e0a26..d9a18caa6f66c769b6f039bc04f4a94db2ad84ca 100644 (file)
@@ -8,7 +8,6 @@ package runtime
 
 import (
        "runtime/internal/atomic"
-       "runtime/internal/sys"
        "unsafe"
 )
 
@@ -474,7 +473,7 @@ func crash() {
                // this means the OS X core file will be >128 GB and even on a zippy
                // workstation can take OS X well over an hour to write (uninterruptible).
                // Save users from making that mistake.
-               if sys.PtrSize == 8 {
+               if GOARCH == "amd64" {
                        return
                }
        }