curl-library
Re: Is Curl_resolve thread safe?
Date: Thu, 19 Aug 2004 12:00:59 +0200 (CEST)
On Wed, 18 Aug 2004, Nigel Horne wrote:
> Is Curl_resolve thread safe()?
Curl_resolv() (it is spelled incorrectly) is a wrapper function for a wide
range of different name resolvers (http://curl.haxx.se/docs/faq.html#5.9).
Stating anything on thread-safety generally for Curl_resolv() would be
strange.
> Valgrind reports errors such as this on every call. The unititialised value
> is of course more serious than the mutex is not locked error.
...
> ==29426== Use of uninitialised value of size 4
> ==29426== at 0x5489D6: gethostbyaddr_r@@GLIBC_2.1.2 (in
> /lib/libc-2.3.2.so)
> ==29426== by 0x51B77A: gaih_inet (in /lib/libc-2.3.2.so)
> ==29426== by 0x51C923: __GI_getaddrinfo (in /lib/libc-2.3.2.so)
> ==29426== by 0xF16CA6: (within /usr/lib/libcurl.so.2.0.2)
I believe this is a problem in (your version of) glibc alternatively a flaw in
valgrind. I can't see how libcurl is using getaddrinfo() the wrong way that
would prevent it from being thread-safe.
I don't get those problems on my Linux ipv6-enabled glibc 2.2.4 when I run the
curl tests.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-08-19