Valgrind

Typical run

$ valgrind --leak-check=full --show-reachable=yes --error-limit=no \
--gen-suppressions=all --log-file=valgrind.log ./src/target_executable

Converting log to suppressions statements

$ sed -E -i -e '/^==[0-9]+.*$/d' valgrind.log

Running with suppressions

$ valgrind --leak-check=full --suppressions=./src/valgrind.supp \
--show-error-list=yes ./src/target_executable

See also https://wiki.wxwidgets.org/Valgrind_Suppression_File_Howto


-- Frank Dean - 28 Apr 2024

Related Topics:* DevelopmentSetup, LinuxDevelopment