Hi, in the packaging readme[0] for valgrind it's stated that it's a bad
idea to strip what's in /usr/lib/valgrind/ because it makes bad reports.
Though if I test, here is what I get:


unstripped:
    ┌─(13:43)────
    └[apollon] valgrind ./a
    ==20112== Memcheck, a memory error detector
    ==20112== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
    ==20112== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
    ==20112== Command: ./a
    ==20112== 
    ==20112== Invalid free() / delete / delete[]
    ==20112==    at 0x4C268FE: free (vg_replace_malloc.c:366)
    ==20112==    by 0x4004F1: main (in /home/madcoder/a)
    ==20112==  Address 0x14 is not stack'd, malloc'd or (recently) free'd
    ==20112== 
    ==20112== 
    ==20112== HEAP SUMMARY:
    ==20112==     in use at exit: 0 bytes in 0 blocks
    ==20112==   total heap usage: 0 allocs, 1 frees, 0 bytes allocated
    ==20112== 
    ==20112== All heap blocks were freed -- no leaks are possible
    ==20112== 
    ==20112== For counts of detected and suppressed errors, rerun with: -v
    ==20112== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 4)
    valgrind ./a  2.82s user 0.10s system 98% cpu 2.969 total
stripped:
    ┌─(13:43)────
    └[apollon] valgrind ./a
    ==20117== Memcheck, a memory error detector
    ==20117== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
    ==20117== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
    ==20117== Command: ./a
    ==20117== 
    ==20117== Invalid free() / delete / delete[]
    ==20117==    at 0x4C268FE: free (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==20117==    by 0x4004F1: main (in /home/madcoder/a)
    ==20117==  Address 0x14 is not stack'd, malloc'd or (recently) free'd
    ==20117== 
    ==20117== 
    ==20117== HEAP SUMMARY:
    ==20117==     in use at exit: 0 bytes in 0 blocks
    ==20117==   total heap usage: 0 allocs, 1 frees, 0 bytes allocated
    ==20117== 
    ==20117== All heap blocks were freed -- no leaks are possible
    ==20117== 
    ==20117== For counts of detected and suppressed errors, rerun with: -v
    ==20117== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 4)
    valgrind ./a  2.08s user 0.08s system 99% cpu 2.165 total

IOW I'm unable to reproduce the sample on [0] since the "free" symbol is still
present. Sure I do lack the line and file in vg_replace_malloc.c but who cares?

FWIW this is a matter of 227Mb large /usr/lib/valgrind versus 71Mb without
debug. Which is kind of huge for a doubtful benefit. So is there something I
miss or does the restriction could be lifted?

Secondly, valgrinds installs a few archives namely:
    /usr/lib/valgrind/libcoregrind-amd64-linux.a
    /usr/lib/valgrind/libcoregrind-x86-linux.a
    /usr/lib/valgrind/libreplacemalloc_toolpreload-amd64-linux.a
    /usr/lib/valgrind/libreplacemalloc_toolpreload-x86-linux.a
    /usr/lib/valgrind/libvex-amd64-linux.a
    /usr/lib/valgrind/libvex-x86-linux.a

What are those used for, are those useful for anything else but valgrind
tools development ? IOW does it makes sense to provide them by default ?

TIA.

    [0] http://valgrind.org/docs/manual/dist.readme-packagers.html
-- 
·O·  Pierre Habouzit
··O                                                [email protected]
OOO                                                http://www.madism.org

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to