cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3577710 ] cURL > 7.21.7 breaks compatiblity with c-ares < 1.6.1

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 23 Oct 2012 14:08:04 -0700

Bugs item #3577710, was opened at 2012-10-16 12:14
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3577710&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: compile or build problem
Group: wrong behaviour
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Vandry (vandry)
Assigned to: Daniel Stenberg (bagder)
Summary: cURL > 7.21.7 breaks compatiblity with c-ares < 1.6.1

Initial Comment:
libcurl versions greatet than 7.21.7 including the current version 7.27.0 no longer function with c-ares versions between 1.5.0 and 1.6.0.

The problem was introduced in the following commit:

commit ca015f1a45c68aa1d641678cfc13ce0df0c58fe0
Author: Vsevolod Novikov <novikov_at_doroga.tv>
Date: Sat Jan 29 20:12:10 2011 +0100

In file lib/asyn-ares.c:

Curl uses the macro ARES_VERSION to decide the value of macro HAVE_CARES_CALLBACK_TIMEOUTS, which affects whether to use a new style or old style prototype for "query_completed_cb". This macro is defines in <ares_version.h>. Curl does not include this header directly, it only includes <ares.h>.

In newer versions of c-ares, <ares.h> includes <ares_version.h> itself, so there is no problem.

In older versions of c-ares, <ares.h> does not include <ares_version.h>, so the macro ARES_VERSION stays undefined. If the actual version of c-ares is 1.5.x or 1.6.0, this means that the wrong prototype is used for query_completed_cb. The compiler issues a warning but it is easy to miss that. The end result is that no host lookups work. (Crashes are also possible.)

Proposed solutions (one or the other):

- Re-add #include <ares_version.h> in asyn-ares.h after #include <ares.h>

- Drop support for versions of c-ares less than 1.6.1 and update the file lib/README.ares and m4/curl-confopts.m4 to reflect this.

-v

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

Comment By: Daniel Stenberg (bagder)
Date: 2012-10-23 14:08

Message:
Thanks for the report, this problem is now fixed in the git repository.

To try it out, you either checkout/update your git clone:
http://curl.haxx.se/source.html

or you try tomorrow's daily snapshot: http://curl.haxx.se/snapshots/

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3577710&group_id=976
Received on 2012-10-23

These mail archives are generated by hypermail.

donate! Page updated January 05, 2012.
web site info

File upload with ASP.NET