Valgrind http://valgrind.org/ is a powerful memory debugging tool which makes debugging many critical and otherwise hard to find glitches in programs next-to-trivial. To use valgrind, simply run the program you want to debug as

valgrind [valgrind options] program [program options]

Valgrind will then load the program and execute it in a virtual machine where it can trace all memory accesses. The result will be running much slower, but valgrind will give you a warning message every time it thinks that something is going wrong. If you have compiled your program with debugging symbols enabled (-g with most compilers), the tool will also give you the source file and line number in which the error occurred. Other than the warnings and the reduced speed, the program will run as usual. Some of the nastiest bugs found by valgrind are:

Valgrind only reports errors up to some limit; after that, it stops counting and tells you just 'to fix your code' :) Also, it can happen that valgrind detects errors originating from external libraries (FORTRAN runtime for example). While one should make sure that those are not triggered by invalid calls to external functions, this usually indicates harmless bugs or cases of sloppiness in the external code.

Oh, most important: valgrind is installed and ready-to-use on our machines :)