How do you tell Valgrind to completely suppress a particular .so file?

For most of the suppression types, you omit the wildcard, like so:

{
   name
   Memcheck:Cond
   obj:/path/to/lib/lib.so.10.1
}

{
   name
   Memcheck:Free
   obj:/path/to/lib/lib.so.10.1
}

{
   name
   Memcheck:Value8
   obj:/path/to/lib/lib.so.10.1
}

Note that you must list each type of error separately, you can’t wildcard them. You must also list the entire pathname of the library (as shown by valgrind, with any “decorations” like version numbers).

Also, leaks are handled differently — for those you need something that looks like this:

{
   name
   Memcheck:Leak
   fun:*alloc
   ...
   obj:/path/to/lib/lib.so.10.1
   ...
}

Leave a Comment