Sample Header Ad - 728x90

Segmentation fault (core dumped) - to where? what is it? and why?

53 votes
5 answers
193528 views
When a segmentation fault occurs in Linux, the error message Segmentation fault (core dumped) will be printed to the terminal (if any), and the program will be terminated. As a C/C++ dev, this happens to me quite often, and I usually ignore it and move onto gdb, recreating my previous action in order to trigger the invalid memory reference again. Instead, I thought I might be able to perhaps use this "core" instead, as running gdb all the time is rather tedious, and I cannot always recreate the segmentation fault. My questions are three: * Where is this elusive "core" dumped? * What does it contain? * What can I do with it?
Asked by Joe (1474 rep)
Apr 18, 2016, 05:26 PM
Last activity: Jun 11, 2025, 07:06 AM