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/5491] Valgrind detects invalid read during getaddrinfo w/o nscd running


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

--- Comment #9 from gglater62 at gmail dot com 2013-05-18 10:05:40 UTC ---
Created attachment 7034
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7034
Sample code

With this sample code valgrind shows errors:
==2394== Syscall param sendmsg(mmsg[0].msg_hdr) points to uninitialised byte(s)
==2394==    at 0x41435B6: sendmmsg (in /lib/libc-2.17.so)
==2394==    by 0x4625254: __libc_res_nsend (in /lib/libresolv-2.17.so)
==2394==    by 0x462292B: __libc_res_nquery (in /lib/libresolv-2.17.so)
==2394==    by 0x4622F4C: __libc_res_nquerydomain (in /lib/libresolv-2.17.so)
==2394==    by 0x462357B: __libc_res_nsearch (in /lib/libresolv-2.17.so)
==2394==    by 0x4617605: _nss_dns_gethostbyname4_r (in
/lib/libnss_dns-2.17.so)
==2394==    by 0x412631E: gaih_inet (in /lib/libc-2.17.so)
==2394==    by 0x41292F2: getaddrinfo (in /lib/libc-2.17.so)
==2394==    by 0x8048514: do_real_lookup (in /home/users/pld/C/a.out)
==2394==    by 0x804853B: main (in /home/users/pld/C/a.out)

I looked at the code and in resolv/res_send.c around line 1115
reqs[0].msg_hdr.msg_flags and reqs[1].msg_hdr.msg_flags are not initialised.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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