Regards
2011/7/27 Marcos Luis Ortiz Valmaseda <marcosluis2186(a)googlemail.com>
Are you using the same valgrind version on both systems?
Use this line to obtain a more detailed output:
valgrind --leak-check=yes myprog arg1 arg2
2011/7/27 Ranjan Maitra <maitra(a)iastate.edu>
> Hi,
>
> I have been trying to use valgrind with Fedora 15 and I find that I am
> not getting the complete backtrace information. Let me provide a simple
> example:
>
> /* file test.c */
>
> #include <stdio.h>
>
> int main(void) {
> int i;
> fprintf(stderr, "i = %d\n", i);
> } /* main */
>
>
> Compile with:
>
> gcc -o -g test test.c
>
>
> Then I run valgrind on Fedora 15, and here is what I get. (I also
> provide the output for Ubuntu 10.04 for comparison.) How can I get more
> complete backtrace information using Fedora?
>
> (Not that I am not interested in debugging the above sample program, but
> for finding out why valgrind for me does not provide more complete
> backtrace information.)
>
> Thanks a lot in advance!
>
> Best wishes,
> Ranjan
>
> Output of valgrind on Fedora 15:
>
> $ valgrind ./test
>
> ==31745== Memcheck, a memory error detector
> ==31745== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
> ==31745== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright
> info
> ==31745== Command: ./test
> ==31745==
> ==31745== Use of uninitialised value of size 4
> ==31745== at 0x4692BA88: _itoa_word (in /lib/libc-2.14.so)
> ==31745==
> ==31745== Conditional jump or move depends on uninitialised value(s)
> ==31745== at 0x4692BA91: _itoa_word (in /lib/libc-2.14.so)
> ==31745==
> ==31745== Use of uninitialised value of size 4
> ==31745== at 0x4692BA88: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x35: ???
> ==31745==
> ==31745== Conditional jump or move depends on uninitialised value(s)
> ==31745== at 0x4692BA91: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x35: ???
> ==31745==
> ==31745== Use of uninitialised value of size 4
> ==31745== at 0x4692BA88: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x3630: ???
> ==31745==
> ==31745== Conditional jump or move depends on uninitialised value(s)
> ==31745== at 0x4692BA91: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x3630: ???
> ==31745==
> ==31745== Use of uninitialised value of size 4
> ==31745== at 0x4692BA88: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x363136: ???
> ==31745==
> ==31745== Conditional jump or move depends on uninitialised value(s)
> ==31745== at 0x4692BA91: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x363136: ???
> ==31745==
> ==31745== Use of uninitialised value of size 4
> ==31745== at 0x4692BA88: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x36313732: ???
> ==31745==
> ==31745== Conditional jump or move depends on uninitialised value(s)
> ==31745== at 0x4692BA91: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x36313732: ???
> ==31745==
> ==31745== Use of uninitialised value of size 4
> ==31745== at 0x4692BA88: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x31373334: ???
> ==31745==
> ==31745== Conditional jump or move depends on uninitialised value(s)
> ==31745== at 0x4692BA91: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x31373334: ???
> ==31745==
> ==31745== Use of uninitialised value of size 4
> ==31745== at 0x4692BA88: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x37333532: ???
> ==31745==
> ==31745== Conditional jump or move depends on uninitialised value(s)
> ==31745== at 0x4692BA91: _itoa_word (in /lib/libc-2.14.so)
> ==31745== by 0x37333532: ???
> ==31745==
> ==31745== Conditional jump or move depends on uninitialised value(s)
> ==31745== at 0x4692D177: vfprintf (in /lib/libc-2.14.so)
> ==31745== by 0x46930D7A: buffered_vfprintf (in /lib/libc-2.14.so)
> ==31745== by 0x469367AE: fprintf (in /lib/libc-2.14.so)
> ==31745== by 0x46903412: (below main) (in /lib/libc-2.14.so)
> ==31745==
> ==31745== Conditional jump or move depends on uninitialised value(s)
> ==31745== at 0x4692CCD1: vfprintf (in /lib/libc-2.14.so)
> ==31745== by 0x46930D7A: buffered_vfprintf (in /lib/libc-2.14.so)
> ==31745== by 0x469367AE: fprintf (in /lib/libc-2.14.so)
> ==31745== by 0x46903412: (below main) (in /lib/libc-2.14.so)
> ==31745==
> i = 1185353716
> ==31745==
> ==31745== HEAP SUMMARY:
> ==31745== in use at exit: 0 bytes in 0 blocks
> ==31745== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
> ==31745==
> ==31745== All heap blocks were freed -- no leaks are possible
> ==31745==
> ==31745== For counts of detected and suppressed errors, rerun with: -v
> ==31745== Use --track-origins=yes to see where uninitialised values come
> from
> ==31745== ERROR SUMMARY: 22 errors from 16 contexts (suppressed: 12 from
> 8)
>
>
>
> Output of valgrind on Ubuntu 10.04:
>
> ==29914== Memcheck, a memory error detector
> ==29914== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
> ==29914== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for
> copyright info
> ==29914== Command: ./test
> ==29914==
> ==29914== Use of uninitialised value of size 8
> ==29914== at 0x4E71E4B: _itoa_word (_itoa.c:195)
> ==29914== by 0x4E73138: vfprintf (vfprintf.c:1613)
> ==29914== by 0x4E778DF: buffered_vfprintf (vfprintf.c:2254)
> ==29914== by 0x4E725AD: vfprintf (vfprintf.c:1306)
> ==29914== by 0x4E7D497: fprintf (fprintf.c:33)
> ==29914== by 0x40058A: main (test.c:5)
> ==29914==
> ==29914== Conditional jump or move depends on uninitialised value(s)
> ==29914== at 0x4E71E55: _itoa_word (_itoa.c:195)
> ==29914== by 0x4E73138: vfprintf (vfprintf.c:1613)
> ==29914== by 0x4E778DF: buffered_vfprintf (vfprintf.c:2254)
> ==29914== by 0x4E725AD: vfprintf (vfprintf.c:1306)
> ==29914== by 0x4E7D497: fprintf (fprintf.c:33)
> ==29914== by 0x40058A: main (test.c:5)
> ==29914==
> ==29914== Conditional jump or move depends on uninitialised value(s)
> ==29914== at 0x4E74FB1: vfprintf (vfprintf.c:1613)
> ==29914== by 0x4E778DF: buffered_vfprintf (vfprintf.c:2254)
> ==29914== by 0x4E725AD: vfprintf (vfprintf.c:1306)
> ==29914== by 0x4E7D497: fprintf (fprintf.c:33)
> ==29914== by 0x40058A: main (test.c:5)
> ==29914==
> ==29914== Conditional jump or move depends on uninitialised value(s)
> ==29914== at 0x4E73226: vfprintf (vfprintf.c:1613)
> ==29914== by 0x4E778DF: buffered_vfprintf (vfprintf.c:2254)
> ==29914== by 0x4E725AD: vfprintf (vfprintf.c:1306)
> ==29914== by 0x4E7D497: fprintf (fprintf.c:33)
> ==29914== by 0x40058A: main (test.c:5)
> ==29914==
> i = 0
> ==29914==
> ==29914== HEAP SUMMARY:
> ==29914== in use at exit: 0 bytes in 0 blocks
> ==29914== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
> ==29914==
> ==29914== All heap blocks were freed -- no leaks are possible
> ==29914==
> ==29914== For counts of detected and suppressed errors, rerun with: -v
> ==29914== Use --track-origins=yes to see where uninitialised values come
> from
> ==29914== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 4 from 4)
>
>
> --
> users mailing list
> users(a)lists.fedoraproject.org
> To unsubscribe or change subscription options:
>
https://admin.fedoraproject.org/mailman/listinfo/users
> Guidelines:
http://fedoraproject.org/wiki/Mailing_list_guidelines
>
--
--
Marcos Luis Ortíz Valmaseda
Software Engineer (UCI)
Linux User # 418229
http://marcosluis2186.posterous.com
https://fedoraproject.org/wiki/User:Marcosluis
--
--
Marcos Luis Ortíz Valmaseda
Software Engineer (UCI)
Linux User # 418229