On Wed, Jan 28, 2009 at 11:06 AM, jody <jody....@gmail.com> wrote:
> Hi
>
> I have checked a TCP-server which i wrote with valgrind-3.4.0,
> and encountered these errors:
> ==15611== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 17 from 1)
> ==15611==
> ==15611== 1 errors in context 1 of 2:
> ==15611== Syscall param socketcall.accept(addr) points to unaddressable 
> byte(s)
> ==15611==    at 0xA4BA01: accept (in /lib/libc-2.7.so)
> ==15611==    by 0x98D38F: (below main) (in /lib/libc-2.7.so)
> ==15611==  Address 0xbea43000 is not stack'd, malloc'd or (recently) free'd
> ==15611==
> ==15611== 1 errors in context 2 of 2:
> ==15611== Syscall param socketcall.accept(addrlen_in) points to
> uninitialised byte(s)
> ==15611==    at 0xA4BA01: accept (in /lib/libc-2.7.so)
> ==15611==    by 0x98D38F: (below main) (in /lib/libc-2.7.so)
> ==15611==  Address 0xbea4233c is on thread 1's stack
>
>
> I simplified the server to the point where it only calls accept (see below),
> and the errors still prevail.
> I compile it with
>   g++ -g -Wall dummysrv.cpp -o dummysrv
> (g++ (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33))
>
> What do these messages mean and how can i fix that?
> The position "below main" is a little bit vague...

I'm not sure this is the cause of the above message, but the call of
accept() is not correct: the third argument of accept() is a
value-result parameter, and should be initialized before passing it to
accept().

Bart.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to