ITK/Dynamic Analysis Practices
- ITK has a policy of ZERO Valgrind errors.
- The developers community has put a lot of effort in reaching this level of quality and it is up to all contributors to keep the dynamic errors to the zero level.
How to run Valgrind locally
How to use this script:
Use Linux or Mac, install
Compile ITK with RelWithDebInfo CMAKE_BUILD_TYPE
cd into the ITK binary build directory
From the TOP of the binary directory type the "ctest" expression that selects the tests that you want to perform memory checking on.
ctest -R itkHDF5ImageIOTest -N
This will print the tests selected by the regular expression but not run the tests (-N option).
Type the path to this script in the ITK source tree and add the select expression from step 4 above.
~/src/ITK/Utilities/Maintenance/runValgrind.sh -R itkHDF5ImageIOTest
This will run the selected tests under valgrind and generate HTML that can be opened with your favorite browser. The HTML is written to ./memcheck_index.html To open:
In Linux, you can do
In Mac, you can do