cURL / Mailing Lists / curl-library / Single Mail


Re: Easy handles & threads

From: <>
Date: Thu, 29 Jul 2004 10:17:20 -0700


>>> "Got easy handle %X for thread %X", m_curlHandle, GetCurrentThreadId()
>>> Got easy handle 1C2BD40 for thread 680 *
>>> Got easy handle 1C2BD40 for thread 5E0 *
> ...
> 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...

you are right. I forgot to check if the handles were cleaned up, which
they of course were. Reading through sloppy code does that to you...

The crash turned out as expected to be caused by using the same curl
handles from different threads at the same time.

Thanks for your help anyways,
Received on 2004-07-29