cURL / Mailing Lists / curl-library / Single Mail


Re: bug in curl when using threaded resolver but no IPv6 since 7.34.0, all connections time out

From: Fabian Frank <>
Date: Thu, 9 Jan 2014 12:29:25 -0800

On Jan 9, 2014, at 10:59 AM, Daniel Stenberg <> wrote:

> The DEBUGASSERT(hints); there in the code will bail out if NULL is passed in, and if you trace back how the 'hints' argument gets passed to init_thread_sync_data() we see that it always comes from init_resolve_thread().

I see. Iím wondering why this is necessary, because getaddrinfo can be called with NULL as hints (according to the MacOS and Linux man page).

On Jan 9, 2014, at 11:07 AM, Daniel Stenberg <> wrote:

> On Thu, 9 Jan 2014, Daniel Stenberg wrote:
>> But init_resolve_thread() that also gets 'hints' as an argument gets called from two different places - depending if getaddrinfo was present or not at configure time. One of them passes NULL as hints...
> ... which it does because the 'hints' field in the thread_sync_data struct only is present if HAVE_GETADDRINFO is defined!

Which IMHO makes sense, because only getaddrinfo accepts a hints parameter, gethostbyname(_r) do not. FYI, I tested that TFTP (UDP) is still working after applying my patch to always pass the hints and it does so on my Mac. This was one concern for regression that I had.

List admin:
Received on 2014-01-09