]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: permit core dumps in darwin-amd64
authorIan Lance Taylor <iant@golang.org>
Thu, 6 Apr 2023 23:38:47 +0000 (16:38 -0700)
committerMichael Knyszek <mknyszek@google.com>
Fri, 7 Apr 2023 14:56:12 +0000 (14:56 +0000)
Previously we did not permit them as Go programs generated enormous
core dumps on macOS. However, according to an investigation in #59446,
they are OK now.

For #59446

Change-Id: I1d7a3f500a6bc525aa6de8dfa8a1d8dbb15feadc
Reviewed-on: https://go-review.googlesource.com/c/go/+/483015
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/signal_unix.go

index c7edbcd239af3ba78f087380d23d48403f835fcd..66c1ddaac31f0ee080976628b4637f14a1861ab5 100644 (file)
@@ -973,16 +973,6 @@ func raisebadsignal(sig uint32, c *sigctxt) {
 
 //go:nosplit
 func crash() {
-       // OS X core dumps are linear dumps of the mapped memory,
-       // from the first virtual byte to the last, with zeros in the gaps.
-       // Because of the way we arrange the address space on 64-bit systems,
-       // 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 GOOS == "darwin" && GOARCH == "amd64" {
-               return
-       }
-
        dieFromSignal(_SIGABRT)
 }