This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/3793] New: getifaddr() triggers Valgrind complaint


getifaddr() triggers a complaint when being run under Valgrind's memcheck tool.

Test program (getifaddr.c):

#include <ifaddrs.h>

int main()
{
 struct ifaddrs *ifa = NULL;
 getifaddrs(&ifa);
 freeifaddrs(ifa);
 return 0;
}

Valgrind output:

==9271== Memcheck, a memory error detector.
==9271== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==9271== Using LibVEX rev 1680, a library for dynamic binary translation.
==9271== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==9271== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation framework.
==9271== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==9271== For more details, rerun with: -v
==9271==
==9271== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==9271==    at 0x40FE911: sendto (in /lib/libc-2.4.so)
==9271==    by 0x411A57E: __netlink_request (in /lib/libc-2.4.so)
==9271==    by 0x411A98D: getifaddrs (in /lib/libc-2.4.so)
==9271==    by 0x8048436: main (in /home/bart/test/getifaddr/getifaddr)
==9271==  Address 0xBECC1EA9 is on thread 1's stack
==9271==
==9271== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==9271==    at 0x40FE911: sendto (in /lib/libc-2.4.so)
==9271==    by 0x411A57E: __netlink_request (in /lib/libc-2.4.so)
==9271==    by 0x411A9AF: getifaddrs (in /lib/libc-2.4.so)
==9271==    by 0x8048436: main (in /home/bart/test/getifaddr/getifaddr)
==9271==  Address 0xBECC1EA9 is on thread 1's stack
==9271==
==9271== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 3 from 1)
==9271== malloc/free: in use at exit: 0 bytes in 0 blocks.
==9271== malloc/free: 5 allocs, 5 frees, 2,088 bytes allocated.
==9271== For counts of detected errors, rerun with: -v
==9271== All heap blocks were freed -- no leaks are possible.

-- 
           Summary: getifaddr() triggers Valgrind complaint
           Product: glibc
           Version: 2.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: bart dot vanassche at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com
  GCC host triplet: i686-suse-linux


http://sourceware.org/bugzilla/show_bug.cgi?id=3793

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]