Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can comments be used in a Valgrind suppression file?

Tags:

valgrind

How do I put a comment in a Valgrind suppression file?

I need to maintain a Valgrind suppression file for a large project. We filter unfixable errors from a tool we link to. It's likely that this file will need to be updated over time as new releases of the tool are released.

Here is an example of a rule we're suppressing:

{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   fun:Wredxor
   obj:/tmp/*/vcs_sim_exe*
   ...
   fun:SNPSle_*
   ...
   fun:VCS_MAIN
   obj:/tmp/*/vcs_sim_exe*
   ...
   fun:main
}

I'd like to add something like the following line before (or inside the rule):

// Rule added for release 2019.X.Y.Z release.

I have not been able to find a reference to comments in the Valgrind documentation.

like image 936
Robert Ekendahl Avatar asked Oct 14 '25 04:10

Robert Ekendahl


2 Answers

Comments in a suppression file are starting with a # character. https://www.valgrind.org/docs/manual/manual-core.html#manual-core.suppress should mention that (and will soon :)).

like image 154
phd Avatar answered Oct 19 '25 19:10

phd


I would also recommend that you use something unique and explanatory for the <insert_a_suppression_name_here> string. In particular if you want to use the suppression file with a test suite, this will allow you to track which suppressions are being used (via either the -v or -s options).

like image 26
Paul Floyd Avatar answered Oct 19 '25 20:10

Paul Floyd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!