Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

generating suppressions for memory leaks

I want suppress Valgrind's reporting of some "definitely lost" memory by the library I'm using. I have tried valgrind --gen-suppressions=yes ./a but it only prompts for errors such as "conditional jump or move depends on uninitialized value".

Is there a way to generate suppressions for straight-up memory leaks? If not, is it difficult to write them by hand? Valgrind's manpage seems to discourage it, at least for errors.

like image 295
Bill Avatar asked Nov 12 '22 03:11

Bill


1 Answers

To be prompted for leaks that aren't generating errors, you have to run

valgrind --leak-check=full --gen-suppressions=yes ./a 
like image 132
Bill Avatar answered Jan 04 '23 03:01

Bill