Responsive Ad Area

Share This Post

test

Ubuntu 16.04 not generating core dump on assert

  • I’ve enabled core dump on both Ubuntu 14.04 and 16.04
    On both OS:

    $ ulimit -c
    unlimited

  • I’ve set the core pattern on both OS.
    On both OS :

    $ cat /proc/sys/kernel/core_pattern
    /var/log/core.%e.%p.%h.%t

I’m running below program’s debug binary on both OS.

#include <assert.h>

int main()
{
    assert(0);
    return 0;
}

On Ubuntu 14.04, I get below output:

$ ./a.out
a.out: test.c:5: main: Assertion `0' failed.
Aborted (core dumped)

Core dump is generated at expected place.

On Ubuntu 16.04, I get below output:

$ ./a.out
a.out: test.c:5: main: Assertion `0' failed.
Aborted

Core dump file is not generated.

How to enable core dump on abort on assert failure in Ubuntu 16.04?


Ubuntu 16.04 not generating core dump on assert
Ubuntu 16.04 not generating core dump on assert
test
{$excerpt:n}

Share This Post

Leave a Reply

Your email address will not be Publishedd. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Skip to toolbar