#940516 valgrind: ONLY uses /usr/lib/$(arch)-linux-gnu/default.supp by default

Package:
valgrind
Source:
valgrind
Description:
instrumentation framework for building dynamic analysis tools
Submitter:
Asher Gordon
Date:
2019-09-23 23:21:03 UTC
Severity:
normal
#940516#5
Date:
2019-09-16 14:59:09 UTC
From:
To:
Dear Maintainer,

The only suppression file that Valgrind loads by default is
/usr/lib/$(arch)-linux-gnu/default.supp
(/usr/lib/x86_64-linux-gnu/default.supp on my system). This is
inconvenient, because if you are using Valgrind to debug a program, but
you don't want to debug the libraries that program uses, or maybe one of
the libraries never free()'s some of its memory (for example ncurses or
Readline), then you will need to load the suppression file manually.

Further more (and this is the reason I tagged this bug as `normal'
rather than `wishlist'), some Debian packages install suppression files
to /usr/lib/valgrind/, and they appear to think that those files will be
loaded automatically. For example, the packages python{,2,3} install the
files /usr/lib/valgrind/python{,2,3}.supp. Here is an excerpt from one
of those files:

  # Debian note:
  # The file Misc/valgrind-python.supp is placed in an modified form into the
  # directory /usr/lib/valgrind as python.supp. There's no need to to add it
  # with the --suppressions option.

But in fact you DO need to add it with the --suppressions option.

To prove that Valgrind actually doesn't load these files, create a file
like this one:

#940516#10
Date:
2019-09-20 00:59:03 UTC
From:
To:
Dear Maintainer,

I have written a patch to fix this bug. I will send it in the next email
(created with git format-patch). The patch is based on commit 3bac39a10
upstream (the current latest).

Please see also upstream bugs 93376 [1] and 160905 [2].

I'll also send the patch upstream to bug 93376.

Thanks,
Asher

[1] https://bugs.kde.org/show_bug.cgi?id=93376
[2] https://bugs.kde.org/show_bug.cgi?id=160905

#940516#15
Date:
2019-09-20 00:11:46 UTC
From:
To:
-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQQ485dc0XNAN7OXgJXUycT8VGCOaAUCXYQldwAKCRDUycT8VGCO
aP8/AQCTDcQsTTza8GHgow2GSvw2BR+g+ht+kbRfU/YukSFlHgD+LfamU/SOk+Ap
pooYybniGSSnmB6vV6zSKDTrzWPg+wU=
=nW4k
-----END PGP SIGNATURE-----
--=-=-=--

#940516#20
Date:
2019-09-20 01:32:40 UTC
From:
To:
Dear Maintainer,

The patch email didn't seem to work properly. Some of the headers are
part of the message somehow. I'm still new to Git, so I guess I didn't
send it properly (Gnus did mention something about fixing the headers or
something like that). Should've used git send-email I guess... Anyway,
I'll just attach the patch to this message below.

#940516#25
Date:
2019-09-20 03:05:43 UTC
From:
To:
Dear Maintainer,

Also, my patch only adds VG_(libdir) as the default suppression
directory (I guess that would be /usr/lib/$(arch)-linux-gnu/valgrind on
Debian). To add other directories, just call
VG_(add_suppression_file)(<desired suppression directory>) after the
line which has

      VG_(add_suppression_file)(VG_(libdir));

in coregrind/m_main.c.

It would be nice to load by default /usr{,/local}/lib/valgrind as well,
but I think that should be done in the Debian package, not upstream.

Thanks,
Asher

#940516#30
Date:
2019-09-23 23:18:41 UTC
From:
To:
Hello,

I have updated the patch to include changes to the documentation. Please
see upstream #93376 [1] for the new patch and further updates.

I think there is a good chance that upstream will accept the patch, so
Debian should just wait until (if) that happens. And when (if) they
accept the patch and release version 3.16.0, Debian should also add

      VG_(add_suppression_file)("/usr/local/lib/valgrind");
      VG_(add_suppression_file)("/usr/lib/valgrind");

after

      VG_(add_suppression_file)(VG_(libdir));

in coregrind/m_main.c like I mentioned before.


Asher


[1] https://bugs.kde.org/show_bug.cgi?id=93376