cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-2218480 ] crash in create_conn while reusing connection

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 03 Nov 2008 12:18:49 +0000

Bugs item #2218480, was opened at 2008-11-03 09:49
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2218480&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: crash
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Igor (ketamin)
Assigned to: Daniel Stenberg (bagder)
Summary: crash in create_conn while reusing connection

Initial Comment:
curl-7.19.1-20081103, Windows

My application sends request in non-blocking mode (using MULTI / curl_multi_socket API).
It creates 2 easy objects and adds them to the multi object in loop.
When the second easy is handled, the application crashes in create_conn function,
while trying to reuse the connection created as a result of handling of the first easy.
The crash occurs in "strcpy(data->info.ip, conn->ip_addr_str);" because the reused connection still has no resolved address (conn->ip_addr_str is NULL).

Notes:
1. The problem is not reproduced constantly
2. The problem is not reproduced if the verbose mode is on
3. A very few additional printf()-s cause the problem not to be reproduced

Question: why does ConnectionExists() doen't checks the check->ip_addr_str if the canPipeline is true?

The attached are setup.h and screenshot of the crash with trace

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2008-11-03 13:18

Message:
Please try the attached "ip_addr_str.patch" and see if it fixes your
problem. It certainly makes the code slightly nicer...

It is also available here: http://daniel.haxx.se/curl/ip_addr_str.patch

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2008-11-03 10:26

Message:
Thanks, this is a real problem caused by my own confusion on what each
struct field does. I'll provide a cleaned up version soon that should
address this.

Answer to the question: the ip_addr_str is not used for that check on
purpose as it isn't needed for it. If you feel otherwise, do take the
question to the mailing list and not in a bugreport.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2218480&group_id=976
Received on 2008-11-03

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET