C program could generate a core dump file, my os is Big Sur beta.

➜  ~ ./a.out
[1]    37539 segmentation fault  ./a.out
➜  ~ ulimit -c unlimited
➜  ~ ./a.out
[1]    37596 segmentation fault (core dumped)  ./a.out
➜  ~ cat a.c
int main() {
    int a = *((int*)(0));
    return a;
}
➜  ~ ls /cores -lh
total 2.9G
-r-------- 1 zah wheel 2.9G Oct  2 13:37 core.37596

On Friday, October 2, 2020 at 12:55:05 PM UTC+8 Ian Lance Taylor wrote:

> On Thu, Oct 1, 2020 at 9:05 PM Kurtis Rader <kra...@skepticism.us> wrote:
> >
> > On Thu, Oct 1, 2020 at 8:36 PM aihui zhu <mr.z...@gmail.com> wrote:
> >>
> >> on a linux virtual machine GOTRACEBACK=crash works fine and would 
> generates core files in working directory for me.
> >
> >
> > I just tested this trivial Go (not CGo) program:
> >
> > package main
> > func main() {
> > panic("WTF")
> > }
> >
> >
> > I ran the above program on Linux distro OpenSuse 42. With the specified 
> env var results I get a core dump. The same action on macOS 10.15 
> (Catalina) only produces a backtrace -- no core dump. Looks like a bug (or 
> unimplemented feature) to me.
>
> Can you get a core dump from a C program on macOS 10.15?
>
> Ian
>

-- 
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/c5f02d22-5d0d-43fc-9ba5-874a69c325b0n%40googlegroups.com.

Reply via email to