cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-2175737 ] IPv6 uses uninitialized bytes?

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sun, 19 Oct 2008 01:15:36 +0000

Bugs item #2175737, was opened at 2008-10-17 19:43
Message generated for change (Comment added) made by luke-jr
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2175737&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: bad behaviour
Status: Open
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Luke-Jr (luke-jr)
Assigned to: Daniel Stenberg (bagder)
Summary: IPv6 uses uninitialized bytes?

Initial Comment:
I get this when using curl in valgrind to fetch an IPv6 URI:

==25448== Syscall param socketcall.connect(serv_addr..sin6_scope_id) points to uninitialised byte(s)
==25448== at 0x4000882: (within /lib/ld-2.6.1.so)
==25448== by 0x45DA731: __libc_res_nquery (in /lib/libresolv-2.6.1.so)
==25448== by 0x45DA9F5: (within /lib/libresolv-2.6.1.so)
==25448== by 0x45DAC2E: __libc_res_nsearch (in /lib/libresolv-2.6.1.so)
==25448== by 0x45D0059: _nss_dns_gethostbyname3_r (in /lib/libnss_dns-2.6.1.so)
==25448== by 0x45D0316: _nss_dns_gethostbyname2_r (in /lib/libnss_dns-2.6.1.so)
==25448== by 0x4125F4B: (within /lib/libc-2.6.1.so)
==25448== by 0x4126AB8: getaddrinfo (in /lib/libc-2.6.1.so)
==25448== by 0x404D5F6: curl_dogetaddrinfo (hostip6.c:115)
==25448== by 0x404D9CF: Curl_getaddrinfo (hostip6.c:285)
==25448== by 0x402E1C2: Curl_resolv (hostip.c:448)
==25448== by 0x402E497: Curl_resolv_timeout (hostip.c:610)
==25448== Address 0x41cfb48 is 24 bytes inside a block of size 28 alloc'd
==25448== at 0x4022E38: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==25448== by 0x45DBA8F: (within /lib/libresolv-2.6.1.so)
==25448== by 0x45DA731: __libc_res_nquery (in /lib/libresolv-2.6.1.so)
==25448== by 0x45DA9F5: (within /lib/libresolv-2.6.1.so)
==25448== by 0x45DAC2E: __libc_res_nsearch (in /lib/libresolv-2.6.1.so)
==25448== by 0x45D0059: _nss_dns_gethostbyname3_r (in /lib/libnss_dns-2.6.1.so)
==25448== by 0x45D0316: _nss_dns_gethostbyname2_r (in /lib/libnss_dns-2.6.1.so)
==25448== by 0x4125F4B: (within /lib/libc-2.6.1.so)
==25448== by 0x4126AB8: getaddrinfo (in /lib/libc-2.6.1.so)
==25448== by 0x404D5F6: curl_dogetaddrinfo (hostip6.c:115)
==25448== by 0x404D9CF: Curl_getaddrinfo (hostip6.c:285)
==25448== by 0x402E1C2: Curl_resolv (hostip.c:448)

Someone in #curl suggested it was a libc bug, but my own software successfully uses getaddrinfo and connect together just fine. This is reproduced using line numbers from CVS HEAD.

----------------------------------------------------------------------

>Comment By: Luke-Jr (luke-jr)
Date: 2008-10-18 20:15

Message:
Apparently it only occurs with a real DNS lookup-- my own code was using
'localhost', which is in my hosts file. Changing it to 'luke.dashjr.org'
did in fact reproduce the problem without libcurl. Sorry to bother.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2008-10-18 16:16

Message:
Host name or not makes no difference to my tests.

Please don't fiddle with the properties of the bug report. 'Works For Me'
just means that we can't repeat the problem and that it works for us.

I would seriously claim that the problem you see is due to a problem in
glibc and not in libcurl. Do you have anything (else) to suggest to why
this isn't the case?

----------------------------------------------------------------------

Comment By: Luke-Jr (luke-jr)
Date: 2008-10-18 16:13

Message:
Try with a hostname:
valgrind --tool=memcheck --leak-check=yes --num-callers=16 curl -v -g
'http://luke.dashjr.org/'

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2008-10-18 16:05

Message:
... and I'm unable to reproduce this with glibc 2.7 (Debian's package named
"2.7-14") and I tried both my CVS HEAD version of curl and 7.18.2

----------------------------------------------------------------------

Comment By: Dan Fandrich (dfandrich)
Date: 2008-10-18 15:25

Message:
I'm unable to reproduce this with glibc 2.6.1 using the command:

libtool --mode=execute valgrind --tool=memcheck --leak-check=yes
--num-callers=16 src/curl -v -g 'http://[::1]:8000/'

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2175737&group_id=976
Received on 2008-10-19

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET