Let's assume we have automated Valgrind testing setup with maximum diagnostics configured (--leak-check=yes --track-origins=yes
etc.) However, on some tests the valgrinded process might crash with SIGSEGV due to some nondeterministic bug. In that case, the immediate diagnostics leading to SIGSEGV are useful, but Valgrind does not stop there and dumps every single live memory allocation as a leak, tens of thousands of them - which are useless in the case of random SIGSEGV.
Is there a way to configure Valgrind to
- print any errors during the program execution and do not abort;
- on regular exit, dump memory leaks;
- on SIGSEGV/SIGABRT/SIGILL/SIG... exit, do not dump memory leaks?
EDIT: this has been logged at Valgrind bug tracker in 2011: https://bugs.kde.org/show_bug.cgi?id=265371