Core dump can mean different things in context...

When you are programming it means that your program hit a segmentation fault and spit out a core file that shows the state of the program running when it crashed.

Also, when a person is fed up and blurts out exactly how they feel...

In Star Trek, refers to a procedure in which a starship dumps its Matter/Antimatter Reaction Assembly (M/ARA), also known as the Warp Core. Performed only in extreme emergencies, when a core breach is imminent, as the procedure will leave the ship without adequate power for defending itself. The antimatter storage tanks are dumped at the same time, since without the core the ship will not be able to maintain a magnetic field which is required to separate the antimatter from the walls of the tanks.

core cancer = C = core leak

core dump n.

[common Iron Age jargon, preserved by Unix] 1. [techspeak] A copy of the contents of core, produced when a process is aborted by certain kinds of internal error. 2. By extension, used for humans passing out, vomiting, or registering extreme shock. "He dumped core. All over the floor. What a mess." "He heard about X and dumped core." 3. Occasionally used for a human rambling on pointlessly at great length; esp. in apology: "Sorry, I dumped core on you". 4. A recapitulation of knowledge (compare bits, sense 1). Hence, spewing all one knows about a topic (syn. brain dump), esp. in a lecture or answer to an exam question. "Short, concise answers are better than core dumps" (from the instructions to an exam at Columbia). See core.

--The Jargon File version 4.3.1, ed. ESR, autonoded by rescdsk.

The origin of the "core dump" originated from magnetic core memory. It's an electro-mechanical form of memory which retained it's settings even after power has been removed.

If a program were to crash the system, you could remove the memory core and physically examine what state the machine is in when it crashed.

This method is no longer in use, since the common use of RAM such as DRAM, SDRAM, and other memory types which lose their settings when power is removed.

For most non-developers, a core dump is simply a large, waste of space on your hard drive, when GIMP craps out on a linux or unix system.

On many Unix systems, when a program crashes (usually due to a Segmentation Fault or some other form of memory access error), the default behaviour is to dump the entire contents of the memory the process was using to a file on disk. This is usually named something along the lines of "program_name.core" or just simply "core".

To most people this is quite useless. With the typical sizes of many program nowadays, these dumps can be very large and take up an annoyingly large amount of space (especially if you have a home filestore with a quota and something like netscape coredumps). On Linux systems you can set the maximum size of core files with the ulimit command, eg.

$ ulimit -c 0

Will disable coredumps (setting the maximum size to 0). To enable them, set the limit to some fairly large value, eg.

$ ulimit -c 1000

Core files are actually useful to programmers. The contents of memory including the stack are included in the core, enabling the programmer to find exactly where the program crashed. You can load the core file using a debugger such as gdb:

$ gdb program_name core
GNU gdb 5.2.90_2002-11-20-cvs-debian
Copyright 2002 Free Software Foundation, Inc.
....
#0 0x080483b4 in func_1 ()
(gdb)

From here you can browse the stack. If you have debugging symbols compiled into the binary you will get the function names which helps greatly:

#0 0x080483b4 in func_1 ()
(gdb) up
#1 0x080483c7 in func_2 ()
(gdb) up
#2 0x080483d7 in func_3 ()
(gdb) up
#3 0x080483e7 in main ()
(gdb) up
#4 0x40039a5f in __libc_start_main () from /lib/libc.so.6
(gdb) up
Initial frame selected; you cannot go up.
(gdb)

You can of course disassemble the functions and find exactly where the crash occurs, but I wont go into a full explanation of how to use gdb as that belongs elsewhere. Personally I find that knowing what function it occurred in is usually enough information to locate the bug.

Log in or register to write something here or to contact authors.