Package: valgrind
Version: 1:3.6.0~svn11254
Severity: wishlist

Hi,

while debugging a particularly tricky problem, I started wondering
whether it would make sense to have an option that would display whether
two stack traces shown for the same error (e.g. one that is triggered by
a double free(), and the trace for the original free() invocation) are
the same instance of the call chain, or just happen to have the same
chain repeatedly.

so:

void my_free(void *p)
{
    free(p);
}

int main(void)
{
    void *p = malloc(5);
    for(unsigned int i = 0; i < 2; ++i)
        my_free(p);
}

The stack trace would probably look like this:

Invalid free() ...
    free() at 0x12345678
    my_free() at 0x11223344
    main() at 0x22334455
.... block of size ... freed ...
    free() at 0x12345678
    my_free() at 0x11223344
    main() at 0x22334455

>From this output I cannot see that it is indeed main() invoking my_free
twice, rather than my_free calling free() multiple times. I'd be
interested in the information that the free() and my_free() stack frames
were freed inbetween, while main()s stack frame remained.

   Simon

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages valgrind depends on:
ii  libc6                         2.11.2-6   Embedded GNU C Library: Shared lib
ii  libc6-dbg                     2.11.2-6   Embedded GNU C Library: detached d

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

Versions of packages valgrind suggests:
pn  alleyoop                      <none>     (no description available)
pn  kcachegrind                   <none>     (no description available)
pn  valkyrie                      <none>     (no description available)

-- no debconf information



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

Reply via email to