I mean that is there any way to expose SIGSEGV to macOS system just like a 
pure C program, so that the system could generate .crash file automatically.
currently, seems that go itself catch the SIGSEGV signal, and prints go 
trace back, so it doesn't trigger system default behavior for SIGSEGV.

please correct me if i'm wrong at something,  thank you.

On Saturday, October 3, 2020 at 10:53:51 AM UTC+8 Kurtis Rader wrote:

> On Fri, Oct 2, 2020 at 12:26 PM Ian Lance Taylor <ia...@golang.org> wrote:
>
>> On Thu, Oct 1, 2020 at 10:44 PM aihui zhu <mr.z...@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/abb89f94-173d-49cf-a70b-5a76c0f1334bn%40googlegroups.com.

Reply via email to