Unable to create a core file for my crashed program

前端 未结 4 2324
遥遥无期
遥遥无期 2021-02-20 13:30

I am using Ubuntu 12.04 LTS. I wrote a simple program as follows to create crash

// null.c
#include

int main()
{
   int *p = NULL;
   int k=*p;
          


        
4条回答
  •  醉酒成梦
    2021-02-20 14:12

    you do not need to use core pattern. its just dumps in that format %e.%p

    what you need to do is #ulimit -c unlimited

    and check #ulimit -a

    and confirm if core file size is set properly. You will get the core as core.pid after that.

提交回复
热议问题