cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Crash during gethostbyname in libcurl

From: Sebastien Trottier <strot_at_paraxip.com>
Date: Wed, 14 Mar 2007 14:58:08 -0400

Hi,
Our product uses libcurl 7.15.4 and one of our customer got a crash with the
same exact stack trace then the one reported by Rom Walton on Jan 10, 2007.

I have the Windows minidump and matching symbols: the "struct
curl_llist_element *e" argument passed to Curl_llist_insert_next() is null
so "ne->next = e->next;" later throws an exception.

curl!Curl_llist_insert_next+0x45
[c:\working_copies\2.1\curl-7.15.4\lib\llist.c @ 78]
curl!Curl_hash_add+0xc3 [c:\working_copies\2.1\curl-7.15.4\lib\hash.c @ 168]
curl!Curl_cache_addr+0x80 [c:\working_copies\2.1\curl-7.15.4\lib\hostip.c @
359]
curl!addrinfo_callback+0x5a
[c:\working_copies\2.1\curl-7.15.4\lib\hostasyn.c @ 129]
curl!Curl_addrinfo4_callback+0x12
[c:\working_copies\2.1\curl-7.15.4\lib\hostasyn.c @ 159]
curl!gethostbyname_thread+0xde
[c:\working_copies\2.1\curl-7.15.4\lib\hostthre.c @ 334]

Anybody had a chance to isolate the problem? I don't see any mention of it
in the known bugs list or release notes.

Thanks,

Sebastien Trottier
Paraxip Technologies

--
From: Daniel Stenberg <daniel_at_haxx.se>
Date: 2007-01-11
On Wed, 10 Jan 2007, Rom Walton wrote:
> I should point out that as far as I am aware, this is only happening on
> Windows. This call stack below was generated by our client software that
> was using libCurl 7.15.3, our current generation of software uses 7.15.5.
We
> still see this crash on our latest clients, but so far none of the clients
> have returned a complete stack trace(clients were unable to download the
> symbol files for some reason).
> Have you all seen this issue before? Is it fixed in 7.16.0?
No, I can't recall having seen it before and I therefore don't think it is
fixed in 7.16.0 (although a memset size error was fixed in the win32
threaded
resolver) nor afterwards.
It would be interesting if you built a custom version of libcurl with the
"normal" resolver instead of the threaded one just to attempt to pinpoint
where the problem might be. That's the one major difference between windows
and other operating systems in the name resolving department that I can
think
of right now.
Received on 2007-03-14