Bug 160905 - automatically load suppression files belonging to shared libraries
Summary: automatically load suppression files belonging to shared libraries
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-16 16:30 UTC by Tobias Elbrandt
Modified: 2017-04-27 08:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.