cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: segfaulting in Curl_num_addresses on OS X and Ubuntu

From: Eric Ridge <eebbrr_at_gmail.com>
Date: Sat, 1 Aug 2015 14:54:23 -0400

> On Aug 1, 2015, at 4:03 AM, Ray Satiro via curl-library <curl-library_at_cool.haxx.se> wrote:
>
> On 7/31/2015 10:44 PM, Eric Ridge wrote:
>> Is there a way to programmatically know if the version being used was compiled with the threaded resolver?
>
> Yes. I wrote an example [1] that will output whether libcurl's resolver is synchronous, c-ares or threaded.

Cool, thanks!

If you take that example with this:

> *If you are using libcurl from multiple threads or libcurl was built with the threaded resolver option (the default in Windows) then the callback replacement functions must be thread safe.*

haven't we already lost?

If curl_version_info() can be called *before* curl_global_init(), then yeah, I'd agree with the above.

But based on your example, it can't. So that's why I'm suggesting the docs say that the allocator functions must be thread safe.

eric
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-08-01