On Fri, Oct 2, 2020 at 12:26 PM Ian Lance Taylor <i...@golang.org> wrote:
> On Thu, Oct 1, 2020 at 10:44 PM aihui zhu <mr.zh...@gmail.com> wrote: > > > > C program could generate a core dump file, my os is Big Sur beta. > > Thanks. > > I see now that for darwin-amd64 we do not generate core dumps. Sorry > for forgetting about that. > > We have this comment: > > // 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. > > It may be worth investigating whether this is still a problem on > current macOS systems. The comment in question is in > runtime/signal_unix.go. It looks like this is still a problem on macOS (at least as of 10.15 Catalina). A trivial C program that does nothing more than char *p = 0; *p = 'x'; results in a 2.1 GB core dump. It might be worth documenting this limitation in the https://golang.org/pkg/runtime/ documentation. :-) -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD9A4RRUQRdL4td%2By9%3DjwSXKZwJrhpajcrS%3Dqs5wLDwnSg%40mail.gmail.com.