cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Easy handles & threads

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 29 Jul 2004 09:56:58 +0200 (CEST)

On Wed, 28 Jul 2004, Gisle Vanem wrote:

>> "Got easy handle %X for thread %X", m_curlHandle, GetCurrentThreadId()
>>

>> Got easy handle 1C2BD40 for thread 680 *
>> Got easy handle 1C2BD40 for thread 5E0 *

...

> That is probably the reason why it crashed in Michaels threaded version
> earlier. I never made it crash with his test program, so I assumed it was an
> user-error.
>
> Your report seems to indicate it has nothing to whether using threaded DNS
> lookups or using C-ares. Maybe only that using C-ares hides the problem or
> uses the heap differently.

I fail to understand how the resolver code can cause this major flaw. The
handle is allocated with calloc() so I can't see any other possibility to
return the same address than to have the first handle free()ed first...

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-07-29