> > I still get errors from puts().
> You could try --track-origins=yes to see where this uninit value comes
> from.
>
> (maybe it might be some optimisation of string handling in libc which
> should be
> ignored by the libc suppression file not exactly up to date for your
> system ?)

I ran with -v and it told me I use /usr/lib/valgrind/default.supp
-rw-r--r-- 1 root root 29668 14.11. 03:22 /usr/lib/valgrind/default.supp
But that's not going to help much. And it didn't contain any version signature.

Errors are coming from getdelim's mallocs.

Hannu

$ valgrind --tool=memcheck --leak-check=yes --show-reachable=yes 
--num-callers=20 --track-origins=yes  ./read_test
==7252== Memcheck, a memory error detector
==7252== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==7252== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==7252== Command: ./read_test
==7252==
foo
==7252== Conditional jump or move depends on uninitialised value(s)
==7252==    at 0x4EAB5FF: ??? (in /lib/libc-2.14.1.so)
==7252==    by 0x4E9354D: fputs (in /lib/libc-2.14.1.so)
==7252==    by 0x400671: main (read_test.c:11)
==7252==  Uninitialised value was created by a heap allocation
==7252==    at 0x4C2893D: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7252==    by 0x4E93EE1: getdelim (in /lib/libc-2.14.1.so)
==7252==    by 0x40063F: main (read_test.c:9)
==7252==
==7252== Conditional jump or move depends on uninitialised value(s)
==7252==    at 0x4E9DBBB: _IO_file_xsputn (in /lib/libc-2.14.1.so)
==7252==    by 0x4E935CC: fputs (in /lib/libc-2.14.1.so)
==7252==    by 0x400671: main (read_test.c:11)
==7252==  Uninitialised value was created by a heap allocation
==7252==    at 0x4C2893D: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7252==    by 0x4E93EE1: getdelim (in /lib/libc-2.14.1.so)
==7252==    by 0x40063F: main (read_test.c:9)
==7252==
==7252== Conditional jump or move depends on uninitialised value(s)
==7252==    at 0x4E9DC1F: _IO_file_xsputn (in /lib/libc-2.14.1.so)
==7252==    by 0x4E935CC: fputs (in /lib/libc-2.14.1.so)
==7252==    by 0x400671: main (read_test.c:11)
==7252==  Uninitialised value was created by a heap allocation
==7252==    at 0x4C2893D: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7252==    by 0x4E93EE1: getdelim (in /lib/libc-2.14.1.so)
==7252==    by 0x40063F: main (read_test.c:9)
==7252==
==7252== Conditional jump or move depends on uninitialised value(s)
==7252==    at 0x4E9DC28: _IO_file_xsputn (in /lib/libc-2.14.1.so)
==7252==    by 0x4E935CC: fputs (in /lib/libc-2.14.1.so)
==7252==    by 0x400671: main (read_test.c:11)
==7252==  Uninitialised value was created by a heap allocation
==7252==    at 0x4C2893D: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7252==    by 0x4E93EE1: getdelim (in /lib/libc-2.14.1.so)
==7252==    by 0x40063F: main (read_test.c:9)
==7252==
==7252== Conditional jump or move depends on uninitialised value(s)
==7252==    at 0x4E9F823: _IO_default_xsputn (in /lib/libc-2.14.1.so)
==7252==    by 0x4E9DC39: _IO_file_xsputn (in /lib/libc-2.14.1.so)
==7252==    by 0x4E935CC: fputs (in /lib/libc-2.14.1.so)
==7252==    by 0x400671: main (read_test.c:11)
==7252==  Uninitialised value was created by a heap allocation
==7252==    at 0x4C2893D: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7252==    by 0x4E93EE1: getdelim (in /lib/libc-2.14.1.so)
==7252==    by 0x40063F: main (read_test.c:9)
==7252==
==7252== Conditional jump or move depends on uninitialised value(s)
==7252==    at 0x4E9F881: _IO_default_xsputn (in /lib/libc-2.14.1.so)
==7252==    by 0x4E9DC39: _IO_file_xsputn (in /lib/libc-2.14.1.so)
==7252==    by 0x4E935CC: fputs (in /lib/libc-2.14.1.so)
==7252==    by 0x400671: main (read_test.c:11)
==7252==  Uninitialised value was created by a heap allocation
==7252==    at 0x4C2893D: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7252==    by 0x4E93EE1: getdelim (in /lib/libc-2.14.1.so)
==7252==    by 0x40063F: main (read_test.c:9)
==7252==
==7252== Use of uninitialised value of size 8
==7252==    at 0x4E9F88B: _IO_default_xsputn (in /lib/libc-2.14.1.so)
==7252==    by 0x4E9DC39: _IO_file_xsputn (in /lib/libc-2.14.1.so)
==7252==    by 0x4E935CC: fputs (in /lib/libc-2.14.1.so)
==7252==    by 0x400671: main (read_test.c:11)
==7252==  Uninitialised value was created by a heap allocation
==7252==    at 0x4C2893D: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7252==    by 0x4E93EE1: getdelim (in /lib/libc-2.14.1.so)
==7252==    by 0x40063F: main (read_test.c:9)
==7252==
foo
==7252==
==7252== HEAP SUMMARY:
==7252==     in use at exit: 0 bytes in 0 blocks
==7252==   total heap usage: 1 allocs, 1 frees, 120 bytes allocated
==7252==
==7252== All heap blocks were freed -- no leaks are possible
==7252==
==7252== For counts of detected and suppressed errors, rerun with: -v
==7252== ERROR SUMMARY: 14 errors from 7 contexts (suppressed: 6 from 6)

                                          
------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to