|
From: Tom H. <th...@cy...> - 2004-08-24 21:34:55
|
In message <412...@ci...>
Tom Hu <to...@ci...> wrote:
> It looks like there are two warning here,
Only one in the output you sent.
> First one is syscall param socketcall.sendto. I initialized "msg"
> parameter with memset zero in xxx_data_to_packet [please see the second
> section] and it still post the warning. Can anyone help why?
Second section of what?
> Second warning is "Address 0x3C32A478 is 40 bytes inside a block of
> size 520 alloc'd" "Can anyone tell me what does it imply?
That's not a second warning, it's part of the detail about the
first warning. The first trace tells you where the uninitialised
memory was used and the second tells you where it was allocated
and exactly which byte was uninitialised.
> ==11466== Syscall param socketcall.sendto(msg) contains uninitialised or
> unaddressable byte(s)
> ==11466== at 0x3C206C5C: sendto (in /lib/tls/libc-2.3.2.so)
> ==11466== by 0x806864B: xxx_send_packet (xxx_action.c:57)
> ==11466== by 0x80699DE: action_send_r_auth_msg (xxx_action.c:732)
> ==11466== by 0x806C452: xxx_sm_internal (xxx_sm.c:265)
> ==11466== by 0x806C776: xxx_sm (xxx_sm.c:344)
> ==11466== by 0x805F8D1: xxx_parser (xxx_parser.c:1471)
So at line 57 of xxx_action.c you called sendto() with a buffer
that included uninitialised data...
> ==11466== Address 0x3C32A478 is 40 bytes inside a block of size 520 alloc'd
> ==11466== at 0x3C01E268: malloc (vg_replace_malloc.c:105)
> ==11466== by 0x8049B05: xxx_malloc (xxx_linux.c:86)
> ==11466== by 0x8056671: xxx_data_to_packet (xxx_packet_context.c:51)
> ==11466== by 0x806EE38: construct_notify (xxx_construct.c:845)
> ==11466== by 0x806FD90: construct_init_message_continue
> (xxx_construct.c:1420)
...and the buffer in question is part or all of the block of
memory allocated at line 51 of xxx_packet_context.c, with the
first uninitialised byte being 40 bytes inside the buffer.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|