Q: What do ``Segmentation violation'', ``Bus error'', and ``General protection fault'' mean? What's a ``core dump''?
A: These symptoms (and any similar messages having to do with memory access violations or protection faults) generally mean that your program tried to access memory it shouldn't have, invariably as a result of stack corruption or improper pointer use. Likely causes are:
Under Unix, any of these problems almost invariably leads to a ``core dump'': a file named core, [footnote] created in the current directory, containing a memory image of the crashed process, for debugging.
The distinction between ``Bus error'' and ``Segmentation Violation'' may or may not be significant; different versions of Unix generate these signals under different sets of circumstances. Roughly speaking, a segmentation violation indicates an attempt to access memory which doesn't even exist, and a bus error indicates an attempt to access memory in an illegal way (perhaps due to an unaligned pointer; see question 16.7).
See also questions 16.3 and 16.4.