cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Crash during gethostbyname in libcurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 15 Mar 2007 23:35:02 +0100 (CET)

On Thu, 15 Mar 2007, Sebastien Trottier wrote:

> Is the memset fix you mentioned in your first response for this thread the
> change from "memset(tsd, 0, sizeof(tsd));" to "memset(tsd, 0,
> sizeof(*tsd));" in hostthre.c::init_thread_sync_data() ?

Yes.

> Do you think it could be related to the reported crash?

Not really, no.

> The crash looks more like a synchronization issue between the asynchronous
> IPv4 resolver on win32 and the client thread. We are not using the "share"
> interface and the dns host cache is protected by mutex only when using a
> share. Could the nullification of the dns hostcache in
> curl_multi_remove_handle() happen at the same time that the callback
> (addrinfo_callback) from the resolver thread try to insert the newly
> resolved hostname?

Hm, perhaps it can...

> My impression is that curl_multi_remove_handle() can be called at any time
> when using the multi interface to abort a transfer.

Yes. Does it feel like something your app is doing when you get the problems?

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-03-15