Can comments be used in a Valgrind suppression file?

Viewed 322

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.

2 Answers

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).

Related