$linuxjunkies
>

core dump

also: core file, memory dump

A core dump is a file containing the memory contents and state of a process at the moment it crashed, used for debugging to understand what caused the failure.

When a program encounters a fatal error (segmentation fault, illegal instruction, etc.), the operating system can automatically save the process's memory image to a file called a core dump. This snapshot includes the heap, stack, registers, and other runtime data, preserving the exact state of the program at the moment of failure.

Developers use core dumps with debuggers like gdb to inspect variable values, trace the call stack, and pinpoint the exact line of code that caused the crash. For example, if a program crashes with a segfault, you can examine the core dump to see which function was executing and what invalid memory access occurred.

Core dumps are often disabled by default due to disk space concerns. You can enable them with ulimit -c unlimited and typically find them in the current working directory as core or core.PID, depending on your system configuration.

Related terms