cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_perform crash in Curl_do after Curl_reconnect_request has been called

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 25 Sep 2012 22:51:31 +0200 (CEST)

On Tue, 25 Sep 2012, Ho-chi Chen wrote:

Thanks for reporting this problem!

> I have the similar issue for 7.21.1.

Similar as what? Are you referring to the thread using your chosen subject
from December 2010 that we then addressed ?

> At first, I debugged it and found the crash was caused by using the variable
> conn which was already freed. So I did the research and found this thread. I
> downloaded 7.27.0 and checked the codes again but I think there still is a
> protential problem.

> for some cases, Curl_done() could free the memory which is assigned to
> *connp and only set conn to NULL but not *connp which becomes a bad address
> and it may cause the crash later.

For which cases? And if so, why doesn't the function then return an error code
that would prevent the calling code from attempting to use the pointer. Or if
an error is returned, why does the user of the function use the pointer then?

I think we would benefit a lot from understanding the root cause for the
problem rather than trying to just fix the sympthom! Can you please help us
and elaborate more on how this happens?

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-25