Valgrind

Valgrind is a program which can check for use of deallocated or uninitialized memory as well as detect memory leaks. To use it with IMP add precommand='valgrind --gen-suppressions=yes --db-attach=yes --undef-value-errors=no --suppressions=/path/to/imp/source/tools/valgrind-python.supp' to your config.py and rebuild tools. The effect of this will be to modify ./tools/imppy.sh to run all programs run using it through valgrind and drop into gdb when an error is detected. Once in gdb, you can move up and down the call stack and inspect the state of variables to try to figure out what occurred. Unfortunately, you can't run the program further.

Note that dropping into gdb does not work when running unit tests (eg scons test will print a message and hang if an error occurs). You should run the test in question by itself ./tools/imppy.sh python mytest.py to use valgrind.

IMP: valgrind (last edited 2010-12-01 00:37:03 by DanielRussel)