cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multi_socket race conditions?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 25 May 2007 23:46:53 +0200 (CEST)

On Fri, 11 May 2007, Michael Wallner wrote:

> Attached program should prove what I'm talking about.

That program uses this "illegal" code flow:

    msg = curl_multi_info_read(cm, &remaining);

    curl_multi_remove_handle(cm, msg->easy_handle);

---> at this point, the memory 'msg' points to has been freed so the following
line (load.c:62) causes havoc:

    curl_easy_cleanup(msg->easy_handle);

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