|
From: Alien <ali...@us...> - 2005-06-24 11:38:46
|
(i'm not on the list) when building valgrind from svn, i noticed the following points: configure doesn't check for libc.a and there is no way to specify to use shared libs instead of static. the svn repos does have xfree4 and xfree3 suppressions, but nothing with x.org... furthermore, when testing valgrind on a program that's _really_ buggy, I got this: [alien@queen buffer-test]$ valgrind -v buffer-test 1 1 10 ==7040== Memcheck, a memory error detector. ==7040== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==7040== Using LibVEX rev 1222, a library for dynamic binary translation. ==7040== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. ==7040== Using valgrind-3.0.0.SVN, a dynamic binary instrumentation framework. ==7040== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. --7040-- Valgrind library directory: /usr/lib64/valgrind --7040-- Command line --7040-- buffer-test --7040-- 1 --7040-- 1 --7040-- 10 --7040-- Startup, with flags: --7040-- -v --7040-- Contents of /proc/version: --7040-- Linux version 2.6.11-6mdk (ro...@qu...) (gcc version 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)) #5 Mon Jun 13 14:26:41 CEST 2005 --7040-- Reading syms from /usr/bin/buffer-test (0x400000) --7040-- Reading syms from /lib64/ld-2.3.4.so (0x11900000) --7040-- Reading suppressions file: /usr/lib64/valgrind/default.supp ==7040== --7040-- Reading syms from /usr/lib64/valgrind/vg_preload_core.so (0x11A17000) --7040-- Reading syms from /usr/lib64/valgrind/vgpreload_memcheck.so (0x11B18000) --7040-- REDIR: 0x1190F520 (index) redirected to 0x11B1B8A0 (index) --7040-- REDIR: 0x1190F6D0 (strcmp) redirected to 0x11B1BD50 (strcmp) --7040-- REDIR: 0x1190F700 (strlen) redirected to 0x11B1BAE0 (strlen) --7040-- Reading syms from /usr/lib/libdynarr.so.0.1.0 (0x11C3A000) --7040-- Reading syms from /usr/lib/libbuffer.so.0.0.1 (0x11D3D000) --7040-- Reading syms from /lib64/tls/libpthread-0.10.so (0x11E40000) --7040-- object doesn't have any line number info --7040-- Reading syms from /lib64/tls/libc-2.3.4.so (0x11F56000) --7040-- object doesn't have a symbol table --7040-- object doesn't have any line number info --7040-- Reading syms from /lib64/libdl-2.3.4.so (0x12187000) --7040-- object doesn't have a symbol table --7040-- object doesn't have any line number info --7040-- REDIR: 0x11FC6B00 (memset) redirected to 0x11B1C140 (memset) --7040-- REDIR: 0x11FC7200 (memcpy) redirected to 0x11B1BDB0 (memcpy) --7040-- REDIR: 0x11FC5C90 (rindex) redirected to 0x11B1B7C0 (rindex) --7040-- REDIR: 0x11FC0D90 (realloc) redirected to 0x11B1B1C3 (realloc) --7040-- REDIR: 0x11FC06E0 (malloc) redirected to 0x11B19DFD (malloc) --7040-- REDIR: 0xFFFFFFFFFF600000 (???) redirected to 0x7001ADC7 (???) --7040-- REDIR: 0xFFFFFFFFFF600400 (???) redirected to 0x7001ADD1 (???) dynarr-test: 1x1 random operations will be done; this may take a while... --7040-- REDIR: 0x11FC03B0 (calloc) redirected to 0x11B1B11A (calloc) --7040-- REDIR: 0x11FC5880 (strlen) redirected to 0x11B1BAA0 (strlen) --7040-- REDIR: 0x11FC69A0 (memmove) redirected to 0x11B1C170 (memmove) ==7040== Thread 3: ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x402F52: test (buffer-test.c:1284) ==7040== by 0x11E460E9: start_thread (in /lib64/tls/libpthread-0.10.so) ==7040== by 0x1201A3C2: clone (in /lib64/tls/libc-2.3.4.so) --7040-- REDIR: 0x11FC5130 (index) redirected to 0x11B1B860 (index) --7040-- Reading syms from /lib64/libgcc_s-3.4.3.so.1 (0x133A9000) --7040-- object doesn't have a symbol table --7040-- object doesn't have any line number info --7040-- REDIR: 0x11FBE6B0 (free) redirected to 0x11B1A94F (free) ==7040== ==7040== Thread 1: ==7040== Invalid read of size 4 ==7040== at 0x11E46E8B: pthread_join (in /lib64/tls/libpthread-0.10.so) ==7040== by 0x40404D: main (buffer-test.c:1742) ==7040== Address 0x90 is not stack'd, malloc'd or (recently) free'd segmentation fault: stats are following with address 505980: stats=1228C568 stats[0]=1 - last lifo_buffer=1228C7A8 : length=2 : last fifo_buffer=1228CCD8 : length=2 ERROR: fifo_buffer_peek(1228CCD8) : segmentation fault fifo_buffer_peek at 3,947101 sec, stopped at 3,948597 lifo_buffer_init at 3,512458 sec, stopped at 3,516138 inited at a undisclosed location...??? dynarr_length=5 start bt at 0 ==7040== ==7040== Use of uninitialised value of size 8 ==7040== at 0x11F94582: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F976FD: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403B9F: sigproc (buffer-test.c:649) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x11F9458C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F976FD: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403B9F: sigproc (buffer-test.c:649) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x11F97FD5: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403B9F: sigproc (buffer-test.c:649) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x11F9691A: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403B9F: sigproc (buffer-test.c:649) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) 0 : thread 0 : lifo_buffer_init(1228C278) : 03,443830 sec : 03,448049 sec 1 : thread 0 : lifo_buffer_init(1228C7A8) : 03,511197 sec : 03,511247 sec 2 : thread 0 : lifo_buffer_init(1228CCD8) : 03,512458 sec : 03,516138 sec 3 : thread 0 : lifo_buffer_init(1228CFD0) : 03,530399 sec : 03,530421 sec 4 : thread 322492768 : fifo_buffer_peek(1228CCD8) : 03,947101 sec : 03,948597 sec ==7040== ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x403992: checkop (buffer-test.c:1549) ==7040== by 0x403C31: sigproc (buffer-test.c:1561) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x403C68: sigproc (buffer-test.c:1567) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x403C61: sigproc (buffer-test.c:1566) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== Use of uninitialised value of size 8 ==7040== at 0x403D30: sigproc (buffer-test.c:1643) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== Use of uninitialised value of size 8 ==7040== at 0x403D3D: sigproc (buffer-test.c:1643) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== Invalid read of size 1 ==7040== at 0x11B1BAA2: strlen (mac_replace_strmem.c:240) ==7040== by 0x11F98926: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403D54: sigproc (buffer-test.c:1643) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== Address 0x400000000 is not stack'd, malloc'd or (recently) free'd ==7040== ==7040== Process terminating with default action of signal 11 (SIGSEGV) ==7040== Access not within mapped region at address 0x400000000 ==7040== at 0x11B1BAA2: strlen (mac_replace_strmem.c:240) ==7040== by 0x11F98926: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403D54: sigproc (buffer-test.c:1643) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== ERROR SUMMARY: 30 errors from 12 contexts (suppressed: 7 from 4) ==7040== ==7040== 1 errors in context 1 of 12: ==7040== Invalid read of size 1 ==7040== at 0x11B1BAA2: strlen (mac_replace_strmem.c:240) ==7040== by 0x11F98926: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403D54: sigproc (buffer-test.c:1643) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== Address 0x400000000 is not stack'd, malloc'd or (recently) free'd ==7040== ==7040== 1 errors in context 2 of 12: ==7040== Use of uninitialised value of size 8 ==7040== at 0x403D3D: sigproc (buffer-test.c:1643) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== 1 errors in context 3 of 12: ==7040== Use of uninitialised value of size 8 ==7040== at 0x403D30: sigproc (buffer-test.c:1643) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== 1 errors in context 4 of 12: ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x403C68: sigproc (buffer-test.c:1567) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== 1 errors in context 5 of 12: ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x403992: checkop (buffer-test.c:1549) ==7040== by 0x403C31: sigproc (buffer-test.c:1561) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== 1 errors in context 6 of 12: ==7040== Invalid read of size 4 ==7040== at 0x11E46E8B: pthread_join (in /lib64/tls/libpthread-0.10.so) ==7040== by 0x40404D: main (buffer-test.c:1742) ==7040== Address 0x90 is not stack'd, malloc'd or (recently) free'd ==7040== ==7040== 4 errors in context 7 of 12: ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x403C61: sigproc (buffer-test.c:1566) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== 4 errors in context 8 of 12: ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x11F9691A: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403B9F: sigproc (buffer-test.c:649) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== 4 errors in context 9 of 12: ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x11F97FD5: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403B9F: sigproc (buffer-test.c:649) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== 4 errors in context 10 of 12: ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x11F9458C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F976FD: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403B9F: sigproc (buffer-test.c:649) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== 4 errors in context 11 of 12: ==7040== Use of uninitialised value of size 8 ==7040== at 0x11F94582: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F976FD: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403B9F: sigproc (buffer-test.c:649) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) ==7040== ==7040== 4 errors in context 12 of 12: ==7040== Thread 3: ==7040== Conditional jump or move depends on uninitialised value(s) ==7040== at 0x402F52: test (buffer-test.c:1284) ==7040== by 0x11E460E9: start_thread (in /lib64/tls/libpthread-0.10.so) ==7040== by 0x1201A3C2: clone (in /lib64/tls/libc-2.3.4.so) --7040-- --7040-- supp: 3 index-not-intercepted-early-enough-HACK-1 --7040-- supp: 1 strlen-not-intercepted-early-enough-HACK-4 --7040-- supp: 1 strlen-not-intercepted-early-enough-HACK-3 --7040-- supp: 2 dl_relocate_object ==7040== ==7040== IN SUMMARY: 30 errors from 12 contexts (suppressed: 7 from 4) ==7040== ==7040== malloc/free: in use at exit: 6280 bytes in 19 blocks. ==7040== malloc/free: 19 allocs, 0 frees, 6280 bytes allocated. ==7040== ==7040== searching for pointers to 19 not-freed blocks. ==7040== checked 16894072 bytes. ==7040== ==7040== LEAK SUMMARY: ==7040== definitely lost: 0 bytes in 0 blocks. ==7040== possibly lost: 272 bytes in 2 blocks. ==7040== still reachable: 6008 bytes in 17 blocks. ==7040== suppressed: 0 bytes in 0 blocks. ==7040== Reachable blocks (those to which a pointer was found) are not shown. ==7040== To see them, rerun with: --show-reachable=yes --7040-- memcheck: sanity checks: 1 cheap, 1 expensive --7040-- memcheck: auxmaps: 1 auxmap entries (64k, 0M) in use --7040-- memcheck: auxmaps: 1 searches, 1 comparisons --7040-- memcheck: secondaries: 21 issued (1344k, 1M) --7040-- memcheck: secondaries: 410 accessible and distinguished (26240k, 25M) --7040-- tt/tc: 5451 tt lookups requiring 5651 probes --7040-- tt/tc: 5413 fast-cache updates, 5 flushes --7040-- translate: new 2612 (62237 -> 1185578; ratio 190:10) --7040-- translate: dumped 0 (0 -> ??) --7040-- translate: discarded 11 (212 -> ??) --7040-- scheduler: 83766 jumps (bb entries). --7040-- scheduler: 1/2967 major/minor sched events. --7040-- sanity: 2 cheap, 1 expensive checks. --7040-- exectx: 4999 lists, 37 contexts (avg 0 per list) --7040-- exectx: 56 searches, 39 full compares (696 per 1000) --7040-- exectx: 0 cmp2, 191 cmp4, 0 cmpAll valgrind: the 'impossible' happened: main(): signal was supposed to be fatal ==7040== at 0x7000C92C: ??? sched status: running_tid=0 Thread 1: status = VgTs_Zombie ==7040== at 0x11B1BAA2: strlen (mac_replace_strmem.c:240) ==7040== by 0x11F98926: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9518C: (within /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F95609: vfprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x11F9DBA7: fprintf (in /lib64/tls/libc-2.3.4.so) ==7040== by 0x403D54: sigproc (buffer-test.c:1643) ==7040== by 0x11F841EF: (within /lib64/tls/libc-2.3.4.so) Note: see also the FAQ.txt in the source distribution. It contains workarounds to several common problems. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind version, and what Linux distro you are using. Thanks. |