Your message dated Wed, 20 Feb 2013 11:03:10 +0000
with message-id <[email protected]>
and subject line Bug#700899: fixed in valgrind 1:3.8.1-2
has caused the Debian Bug report #700899,
regarding valgrind: still-reachable calloc from dlopen when linked against 
-lpthread (suppression needed?)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
700899: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=700899
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: valgrind
Version: 1:3.8.1-1
Severity: normal
Tags: patch

If i link the simple program below with -lpthread, then valgrind
reports a block of 32 bytes still-reachable from calloc within
dlopen().

If i do not link with -lpthread, then valgrind reports no errors.

0 dkg@alice:~$ cat dlopentest.c
#include <dlfcn.h>
#include <stdio.h>

int main() {
  void* x;
  int j;
  x = dlopen("/usr/lib/x86_64-linux-gnu/libm.so", RTLD_LOCAL | RTLD_NOW);
  j = dlclose(x);
  printf("result: %d\n", j);
  printf("bar: %s\n", dlerror());
  return 0;
}
0 dkg@alice:~$ gcc -g -Wall -Werror --pedantic --std=c99 -o dlopentest -ldl 
-lpthread dlopentest.c
0 dkg@alice:~$ valgrind  --leak-check=full  --show-reachable=yes -- ./dlopentest
==10368== Memcheck, a memory error detector
==10368== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==10368== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==10368== Command: ./dlopentest
==10368== 
result: 0
bar: (null)
==10368== 
==10368== HEAP SUMMARY:
==10368==     in use at exit: 32 bytes in 1 blocks
==10368==   total heap usage: 6 allocs, 5 frees, 1,494 bytes allocated
==10368== 
==10368== 32 bytes in 1 blocks are still reachable in loss record 1 of 1
==10368==    at 0x4C280A4: calloc (vg_replace_malloc.c:593)
==10368==    by 0x4E3235F: _dlerror_run (dlerror.c:142)
==10368==    by 0x4E31EE0: dlopen@@GLIBC_2.2.5 (dlopen.c:88)
==10368==    by 0x400672: main (dlopentest.c:7)
==10368== 
==10368== LEAK SUMMARY:
==10368==    definitely lost: 0 bytes in 0 blocks
==10368==    indirectly lost: 0 bytes in 0 blocks
==10368==      possibly lost: 0 bytes in 0 blocks
==10368==    still reachable: 32 bytes in 1 blocks
==10368==         suppressed: 0 bytes in 0 blocks
==10368== 
==10368== For counts of detected and suppressed errors, rerun with: -v
==10368== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 7)
0 dkg@alice:~$ 

I discovered this while investigating what looked like leaks in
p11-kit, and Stef Walter suggested that the right approach here is
probably just to ask for a valgrind suppression for this particular
leak.

http://lists.freedesktop.org/archives/p11-glue/2013-February/000263.html

I've tested by adding a suppression like the following, and it does
seem to suppress this particular warning:

--- a/usr/lib/valgrind/debian-libc6-dbg.supp    2012-09-19 13:59:48.000000000 
-0400
+++ b/usr/lib/valgrind/debian-libc6-dbg.supp    2013-02-18 17:26:16.162482140 
-0500
@@ -34,3 +34,11 @@
    fun:__pthread_initialize_manager
    fun:pthread_create@@GLIBC_2.1
 }
+{
+   Debian libpthread (libc6-dbg) - dlopen
+   Memcheck:Leak
+   fun:calloc
+   fun:_dlerror_run
+   fun:dlopen@@GLIBC_2.2.5
+   fun:main
+}

If you decide that this is actually a problem with libc6 instead, feel
free to forward this bug report to that package, and i'll try to help
other people replicate the problem if that's useful.

Thanks for maintaining valgrind in debian!

      --dkg

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.7-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages valgrind depends on:
ii  libc6      2.13-38
ii  libc6-dbg  2.13-38

Versions of packages valgrind recommends:
ii  gdb           7.4.1+dfsg-0.1
ii  valgrind-dbg  1:3.8.1-1

Versions of packages valgrind suggests:
pn  alleyoop      <none>
pn  kcachegrind   <none>
pn  valgrind-mpi  <none>
pn  valkyrie      <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: valgrind
Source-Version: 1:3.8.1-2

We believe that the bug you reported is fixed in the latest version of
valgrind, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alessandro Ghedini <[email protected]> (supplier of updated valgrind package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 20 Feb 2013 11:21:07 +0100
Source: valgrind
Binary: valgrind valgrind-dbg valgrind-mpi
Architecture: source amd64
Version: 1:3.8.1-2
Distribution: unstable
Urgency: low
Maintainer: Alessandro Ghedini <[email protected]>
Changed-By: Alessandro Ghedini <[email protected]>
Description: 
 valgrind   - instrumentation framework for building dynamic analysis tools
 valgrind-dbg - instrumentation framework for building dynamic analysis tools 
(de
 valgrind-mpi - instrumentation framework for building dynamic analysis tools 
(MP
Closes: 696694 696850 700899
Changes: 
 valgrind (1:3.8.1-2) unstable; urgency=low
 .
   [ Alessandro Ghedini ]
   * Bump Standards-Version to 3.9.4 (no changes needed)
   * Quote LD_LIBRARY_PATH in the wrapper script to avoid errors with spaced
     paths (LP: #880685)
   * Enable support for mipsel too (Closes: #696850)
   * Add suppression for dlopen() leak when linking with -lpthread
     (Closes: #700899)
 .
   [ Samuel Bronson ]
   * Allow building more than once from the same tree
     - Build and ship FAQ.txt from sources, since the bundled copy is deleted
       on "make clean"
   * Drop docs/valgrind.1 changes from 08_fix-spelling-in-manpage.patch
   * Add 10_unbreak-xinclude-in-manpage.patch to fix a broken XInclude
     (Closes: #696694)
Checksums-Sha1: 
 98fb0e5f3308c8de66967488a33b301f278d409d 2180 valgrind_3.8.1-2.dsc
 c8a0f1b22b4cbe70c504900008200910f78e339d 30205 valgrind_3.8.1-2.debian.tar.gz
 520cbaa8cf8c71dfdfb79cba6d1fea83f9717cc2 32202292 valgrind_3.8.1-2_amd64.deb
 34e39ea356bd896e29f55bfd4920c5271d703697 83889370 
valgrind-dbg_3.8.1-2_amd64.deb
 cfdc64608f52c20e097ed698622ccdebfce3fce8 101828 valgrind-mpi_3.8.1-2_amd64.deb
Checksums-Sha256: 
 a38226b82aec9b002e3e69ff8e78aa44bf3d0a6602b2ce98311420ba67d90ef3 2180 
valgrind_3.8.1-2.dsc
 8b57b54a68e77a52fd02ab91f5e46b1aafabd803fd975568fa911b7403770aac 30205 
valgrind_3.8.1-2.debian.tar.gz
 95e7a63f76d9c550bc5d61e28667b81dce18569590dafd42b29edf11ac0bd823 32202292 
valgrind_3.8.1-2_amd64.deb
 8b1a129698275c08969d77c17da4f2e53fdebc3cf8970c4a5c4d991faa95b75c 83889370 
valgrind-dbg_3.8.1-2_amd64.deb
 16ed4c9d8e86abc1f79e33c97bf95d977ff9599ebfac5be05d89f1e46267736b 101828 
valgrind-mpi_3.8.1-2_amd64.deb
Files: 
 58b243db29cdeaceec4fc10809aab916 2180 devel optional valgrind_3.8.1-2.dsc
 7067286f9f69ee7b32c3d173c9b71b1b 30205 devel optional 
valgrind_3.8.1-2.debian.tar.gz
 7df1c172325936c0de209f0feae95f6c 32202292 devel optional 
valgrind_3.8.1-2_amd64.deb
 05587f4ab95c114b1bc31d92083a0a02 83889370 debug extra 
valgrind-dbg_3.8.1-2_amd64.deb
 e8b5dd7088cc615bac0f1fa3058b42e3 101828 devel optional 
valgrind-mpi_3.8.1-2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJRJKWoAAoJEK+lG9bN5XPLqQQP/0x75+H24ZGTugILRQsASl/H
6tCfmghDqH7K5jhY2iygUI+zn7OQTSCfiyfIBGYIbd2n9+/WWDdfzDlRg196YlAM
L8FMvv7Pw+q/mASPp6I9JOcj9Juol2IN2k0QPBZ7g/0BQESC8kvGDVaAQyZNkYZ+
M51Hoa1T9y/6HdhT1Q0FUi1Nq6vP53Nnz3ZddgcPWswczrgf86EVqWo68xk9s16E
RQRTR+x0nov1ZAUxhu81S6e+cGvdgXCqcsjYFAUvoMGmm2sXhi9kZqbXbqcJ7AW/
/4OpcPr4VyC9D0ZNM5Av47d+6HTU0Wym8mboHjFb6tMGtcBi1vAOD5emyr4/dXH+
XgGHa9Po+EPn9OaRy91TYQ0BwmKyd26NcrMEEuyiQ0wnWRkt9H9YALQVt/ZuKM4M
qk2h9kv8kThL/8kpdDc0xTIe39f9UoPlnLR0l9DR4GHyRV2g3PyarJ+DcGsKbQ/p
Kwzt7Kf+J/qbTv37waT8tz89pLk57Xf3rQc59KQr4Oso19P16Gm4igJ4HiCfLSHE
rOtxWYcdytMUzdmivAYnltegfVYEzuipEAAGx9rNSlWIDbR6hxVr42P7JEQBRpHA
6HbM8FwPfRX4Hj+K5kQhtHzu//mp5L/dS9XTU71v45OZWiidgAP6gU63nrRfK3X+
0dELPFS2+wwVm6Vjrx7l
=LGN7
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to