Package: valgrind
Version: 1:3.1.0-2
Severity: normal

Hi,

The following simple test:

  #include <stdlib.h>
  int main() { return rpmatch( "leaks" ); }

Produces the output attached below.  Looking at the source of
glibc-2.3.2.ds1, stdlib/rpmatch.c -- the 'leak' appears to be
the result of static allocations that are expected to survive
'cached' until the process exits.

It is surely not more of a 'bug' in glibc than anywhere else
that sort of thing is done, and is in fact probably a Good
Thing, so I guess we just need to add the relevant suppressions
for Debian glibc.

I haven't looked at the 2.3.5-11 source (which is the libc
version I'm really using), or updated to 2.3.5-12 which is
in sid now -- but I don't expect this should have radically
changed in either of them.

cheers,
Ron

==6130== Memcheck, a memory error detector.
==6130== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==6130== Using LibVEX rev 1471, a library for dynamic binary translation.
==6130== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==6130== Using valgrind-3.1.0-Debian, a dynamic binary instrumentation 
framework.
==6130== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==6130== 
--6130-- Command line
--6130--    ./rpmatch-leak
--6130-- Startup, with flags:
--6130--    --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
--6130--    -v
--6130--    --leak-check=full
--6130--    --show-reachable=yes
--6130-- Contents of /proc/version:
--6130--   Linux version 2.6.12 ([EMAIL PROTECTED]) (gcc version 3.3.6 (Debian 
1:3.3.6-7)) #1 Thu Jun 23 19:24:16 CST 2005
--6130-- Arch and subarch: X86, x86-sse2
--6130-- Valgrind library directory: /usr/lib/valgrind
--6130-- Reading syms from /lib/ld-2.3.5.so (0x4000000)
--6130-- Reading debug info from /lib/ld-2.3.5.so...
--6130-- ... CRC mismatch (computed FA6C8D01 wanted 0CBE367F)
--6130--    object doesn't have a symbol table
--6130-- Reading syms from /home/ron/z/rpmatch-leak (0x8048000)
--6130-- Reading syms from /usr/lib/valgrind/x86-linux/memcheck (0xA000000)
--6130--    object doesn't have a dynamic symbol table
--6130-- Reading suppressions file: /usr/lib/valgrind/debian-libc6-dbg.supp
--6130-- Reading suppressions file: /usr/lib/valgrind/default.supp
--6130-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_core.so 
(0x4018000)
--6130-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so 
(0x401A000)
--6130-- Reading syms from /lib/tls/libc-2.3.5.so (0x402E000)
--6130-- Reading debug info from /lib/tls/libc-2.3.5.so...
--6130-- ... CRC mismatch (computed 3848D23F wanted 0072C5C6)
--6130--    object doesn't have a symbol table
--6130-- DWARF2 CFI reader: unhandled CFI instruction 0:50
--6130-- DWARF2 CFI reader: unhandled CFI instruction 0:50
--6130-- REDIR: 0x409C0D0 (rindex) redirected to 0x401CCB0 (rindex)
--6130-- REDIR: 0x4096850 (malloc) redirected to 0x401B39B (malloc)
--6130-- REDIR: 0x409BCA0 (strlen) redirected to 0x401CED0 (strlen)
--6130-- REDIR: 0x4096DD0 (realloc) redirected to 0x401C721 (realloc)
--6130-- REDIR: 0x409CD00 (memset) redirected to 0x401D260 (memset)
--6130-- REDIR: 0x4096500 (calloc) redirected to 0x401C676 (calloc)
--6130-- REDIR: 0x4094A80 (free) redirected to 0x401BEBA (free)
==6130== 
==6130== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 11 from 1)
--6130-- 
--6130-- supp:   11 Debian libc6 2.3.5 stripped dynamic linker
==6130== malloc/free: in use at exit: 2,472 bytes in 84 blocks.
==6130== malloc/free: 92 allocs, 8 frees, 4,640 bytes allocated.
==6130== 
==6130== searching for pointers to 84 not-freed blocks.
==6130== checked 57,648 bytes.
==6130== 
==6130== 8 bytes in 2 blocks are still reachable in loss record 1 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40D3550: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40D32CE: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40D32CE: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DB730: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 32 bytes in 8 blocks are still reachable in loss record 2 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40CBBDB: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40D7FC9: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DACA8: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 40 bytes in 8 blocks are still reachable in loss record 3 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40D02C4: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DB894: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 48 bytes in 2 blocks are still reachable in loss record 4 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40DA7CA: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 64 bytes in 8 blocks are still reachable in loss record 5 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40D80EC: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DACA8: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 64 bytes in 8 blocks are still reachable in loss record 6 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40D7E37: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DACA8: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 64 bytes in 2 blocks are still reachable in loss record 7 of 16
==6130==    at 0x401C6FC: calloc (vg_replace_malloc.c:279)
==6130==    by 0x40D43A1: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40D690A: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40D5E3A: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40D5F90: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DA52D: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 96 bytes in 8 blocks are still reachable in loss record 8 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40D80BE: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DACA8: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 96 bytes in 2 blocks are still reachable in loss record 9 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40DA2B3: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 144 bytes in 2 blocks are still reachable in loss record 10 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40DA817: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 144 bytes in 2 blocks are still reachable in loss record 11 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40DA803: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 144 bytes in 2 blocks are still reachable in loss record 12 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40DA7EF: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 192 bytes in 2 blocks are still reachable in loss record 13 of 16
==6130==    at 0x401C6FC: calloc (vg_replace_malloc.c:279)
==6130==    by 0x40DA2DD: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 408 bytes in 18 blocks are still reachable in loss record 14 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x401C765: realloc (vg_replace_malloc.c:306)
==6130==    by 0x40DB600: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 416 bytes in 8 blocks are still reachable in loss record 15 of 16
==6130==    at 0x401C6FC: calloc (vg_replace_malloc.c:279)
==6130==    by 0x40D7E01: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DACA8: (within /lib/tls/libc-2.3.5.so)
==6130==    by 0x40DBC5A: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== 
==6130== 512 bytes in 2 blocks are still reachable in loss record 16 of 16
==6130==    at 0x401B41A: malloc (vg_replace_malloc.c:149)
==6130==    by 0x40DBBE2: regcomp (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x40659CC: rpmatch (in /lib/tls/libc-2.3.5.so)
==6130==    by 0x80483AB: main (in /home/ron/z/rpmatch-leak)
==6130== 
==6130== LEAK SUMMARY:
==6130==    definitely lost: 0 bytes in 0 blocks.
==6130==      possibly lost: 0 bytes in 0 blocks.
==6130==    still reachable: 2,472 bytes in 84 blocks.
==6130==         suppressed: 0 bytes in 0 blocks.
--6130--  memcheck: sanity checks: 0 cheap, 1 expensive
--6130--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--6130--  memcheck: auxmaps: 0 searches, 0 comparisons
--6130--  memcheck: secondaries: 7 issued (448k, 0M)
--6130--  memcheck: secondaries: 19 accessible and distinguished (1216k, 1M)
--6130--     tt/tc: 4,197 tt lookups requiring 4,242 probes
--6130--     tt/tc: 4,197 fast-cache updates, 2 flushes
--6130-- translate: new        2,092 (45,196 -> 720,802; ratio 159:10) [0 scs]
--6130-- translate: dumped     0 (0 -> ??)
--6130-- translate: discarded  0 (0 -> ??)
--6130-- scheduler: 31,775 jumps (bb entries).
--6130-- scheduler: 0/2,306 major/minor sched events.
--6130--    sanity: 1 cheap, 1 expensive checks.
--6130--    exectx: 30,011 lists, 96 contexts (avg 0 per list)
--6130--    exectx: 111 searches, 15 full compares (135 per 1000)
--6130--    exectx: 587 cmp2, 26 cmp4, 0 cmpAll


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages valgrind depends on:
ii  libc6                         2.3.5-11   GNU C Library: Shared libraries an

Versions of packages valgrind recommends:
ii  gdb                           6.4-1      The GNU Debugger

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to