cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: crash in iOS build

From: Fabian Frank <fabian.frank.de_at_gmail.com>
Date: Thu, 9 Jan 2014 10:21:42 -0800

On Jan 9, 2014, at 8:40 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Wed, 8 Jan 2014, Brett Harrison wrote:
>
>> I added these lines to the easy handle init.
>>
>> curl_easy_setopt(_curl, CURLOPT_CONNECTTIMEOUT, 30);
>>
>> curl_easy_setopt(_curl, CURLOPT_TIMEOUT_MS, 40000);
>> When running to the device (in my case an ipad). I changed the URL: to
>> http://www.cats.com (www.google.com and www.yahoo.com) always work.
>> cats.com always times out. Maybe it has something to do with the number of
>> IP addresses mapped in the DNS entry...
>
> Then this sounds exactly like the problem in the other thread about timeouts and threaded-resolver…

Brett, you could verify that by applying the following patch and testing if the problem persists:
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
index 0adac40..4ae904c 100644
--- a/lib/asyn-thread.c
+++ b/lib/asyn-thread.c
@@ -209,12 +209,8 @@ int init_thread_sync_data(struct thread_sync_data * tsd,
  memset(tsd, 0, sizeof(*tsd));

  tsd->port = port;
-#ifdef CURLRES_IPV6
  DEBUGASSERT(hints);
  tsd->hints = *hints;
-#else
- (void) hints;
-#endif

  tsd->mtx = malloc(sizeof(curl_mutex_t));
  if(tsd->mtx == NULL)

If this fixes the problem, you are experiencing the same bug that I have. As I said in the other thread, please assume this fix might break other things (non-http protocols, etc), as I don’t know all of the potential side effects.

HTH,
Fabian
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-01-09