Bug 160905

Summary: automatically load suppression files belonging to shared libraries
Product: [Developer tools] valgrind Reporter: Tobias Elbrandt <elbrandt>
Component: generalAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: wishlist CC: bugzilla, gdesmott
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Tobias Elbrandt 2008-04-16 16:30:36 UTC
Version:            (using Devel)
Installed from:    Compiled sources

If you program applications that use libraries from other sources (X, Qt, SDL, libdc1394 in my case) you get lots of errors from these libraries. You first have to build suppression rules for all these libraries to see your own bugs. All these suppression rules have to be added in each call of valgrind.

My proposal: It should be possible for valgrind to find out which shared libs are used in a program (like ldd does). Then it looks at a list in a file where libraries are associated with suppression files. E.g.
/usr/lib64/libdc1394_control.so.13 /usr/share/valgrind/suppressions/libdc1394_control.so.13.supp
/usr/X11R6/lib64/libGL.so.1 /usr/share/valgrind/suppressions/libGL.so.1.supp
/usr/lib64/libX11.so.6 /usr/share/valgrind/suppressions/libX11.so.6.supp
etc.

There could also be some default rules like: if you use libXYZ.so.7 look for libXYZ.so.7.supp in the suppression directory.
Comment 1 Guillaume Desmottes 2017-04-27 08:40:54 UTC
See also bug #93376 where this could be implemented using a specific directory (/usr/lib/valgrind/supp.d/) where each lib could install its suppression file.