Am Montag, den 27.07.2009, 21:24 +0400 schrieb Pavel Shevaev:
> On Mon, Jul 27, 2009 at 2:55 PM, Bart Van
> Assche<[email protected]> wrote:
> > On Mon, Jul 27, 2009 at 12:42 PM, Pavel Shevaev<[email protected]> 
> > wrote:
> >> Folks, could you please tell what exactly this error message mean? I
> >> googled around the documentation and found nothing...
> >
> > The text you quoted in the title of this e-mail is not an error
> > message by itself, but a clarification of the error message printed
> > above that message. It would help if you could post the entire
> > message.
> 
> Thanks for the quick reply! For example, I have the following lines in
> valgrind log:
> 
> ==31513== Thread 3:
> ==31513== Syscall param socketcall.sendmsg(msg.msg_iov[i]) points to
> uninitialised byte(s)
> ......
> (lot's of lines looking like this)
> ==31513==    by 0x59549EA:
> ......
> ==31513==  Address 0xad39096 is 86 bytes inside a block of size 32,444 alloc'd
> .....
> (some more lines)
> 

That looks like you used the --track-origins=yes command line parameter
for Valgrind. The "Syscall param ... points to uninitialised byte(s)"
message means that the memory that you passed as parameter to sendmsg()
contains uninitialized bytes (Valgrind knows that the memory passed to
sendmsg() should be initialized, so it prints a warning).

The lines following that give the backtrace for the sendmsg() call; and
the message "Address 0xad39096 is 86 bytes inside a block of size 32,444
alloc'd ..." tells you details about the above error:
- where the uninitialized memory was originally allocated (the lines
following the "Address 0xad39096 is 86 bytes inside..." line should give
the exact backtrace to the malloc() call)
- which byte in the memory is uninitialized; in this case it's the 86th
byte.

You could now look at the byte at offset 86 in the message you send out,
and check what data should be at that position, and check at which point
in your code the data should be initialized.

Personally I'd guess that offset contains just padding bytes or space
reserved for future extensions; so maybe it's no problem to leave it
uninitialized (though in security-sensitive areas it might pass
"confidential data" over the net - just guessing here). Setting those
unused bytes to 0 would then fix the Valgrind warning.

Regards,
Oliver



------------------------------------------------------------------------------
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to