I compiled some C code, once with gcc, and then with g++, so I got two output executable files. When executing both files I found that it told me:
Segmentation fault (core dumped)But there is no sign of any core dumps in /var/crash to do with this (only old stuff) so where would they be (I wouldn't expect them to be in there, but just thought I'd mention that I had checked)? I am running Ubuntu GNOME 16.04 with GNOME 3.20.
1 Answer
Core dumping is disabled by default in Ubuntu by setting the maximum dumping file size to 0 for all users.
You can check this by:
ulimit -cBy default it would show 0.
Now to enable core dumping, set the size to the value you want (or unlimited).
For example, setting the maximum dumping file size as 4 KB:
ulimit -c 8-c takes block numbers with each block being 512 Bytes.
Setting to unlimited (Not recommended):
ulimit -c unlimitedThis will change the limit for the current user and not permanently. To make the changes effective for users selectively and permanently, you should edit the /etc/security/limits.conf file and set your desired values.