curl / Mailing Lists / curl-library / Single Mail


Re: Application gets blocked in libcurl v7.50.2

From: Ray Satiro via curl-library <>
Date: Tue, 7 Mar 2017 03:00:05 -0500

On 3/6/2017 12:07 AM, Saurav Babu wrote:
> On further analysis it is observed that timeout_ms value in waitperform() function is -1. I checked code
> and found that if timeout_ms is less that 0 then there is a possibility of timeout argument to be NULL in
> select function call. According to man page of select(), it can block indefinitely if timeout argument is
> Is there any specific reason for timeout_ms to be -1?
> Also is there any way so that application is not blocked indefinitely in such situations?

The behavior you experienced was a bug and has now been fixed along with
two other bugs in the same area. There are 3 commits for the fixes:
29be83e [1], bfaab31 [2] and 958e176 [3].

Or if it's easier since nothing else has really changed from 7.50.2 in
asyn-ares.c (besides style changes) if your copy is not modified you
could just replace the one you have with the one from master [4]. And of
course you could do the same thing if you use the latest curl release
[5][6] (recommended).


Received on 2017-03-07