Here is a excelent compilation of the most used commands with Valgrind<br><a href="http://techtalkies.blogspot.com/2011/06/valgrind-cheat-sheet-notes.html">http://techtalkies.blogspot.com/2011/06/valgrind-cheat-sheet-notes.html</a><br>
<br>Regards<br><br><div class="gmail_quote">2011/7/27 Marcos Luis Ortiz Valmaseda <span dir="ltr">&lt;<a href="mailto:marcosluis2186@googlemail.com">marcosluis2186@googlemail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Are you using the same valgrind version on both systems?<br>Use this line to obtain a more detailed output:<br><pre>valgrind --leak-check=yes myprog arg1 arg2<br></pre><div><div></div><div class="h5"><br><br><div class="gmail_quote">

2011/7/27 Ranjan Maitra <span dir="ltr">&lt;<a href="mailto:maitra@iastate.edu" target="_blank">maitra@iastate.edu</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

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

 <a href="https://fedoraproject.org/wiki/User:Marcosluis" target="_blank">https://fedoraproject.org/wiki/User:Marcosluis</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br><br>-- <br>Marcos Luis Ortíz Valmaseda<br> Software Engineer (UCI)<br> Linux User # 418229<br> <a href="http://marcosluis2186.posterous.com">http://marcosluis2186.posterous.com</a><br>
 <a href="https://fedoraproject.org/wiki/User:Marcosluis">https://fedoraproject.org/wiki/User:Marcosluis</a><br>