cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: segfaulting in Curl_num_addresses on OS X and Ubuntu

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 2 Aug 2015 00:28:02 +0200 (CEST)

On Sat, 1 Aug 2015, Eric Ridge wrote:

>> *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.

Well it can't. But if you build curl yourself for your own pleasure and fun,
and you don't use the threaded resolver, it is useful information that the
memory functions don't need to be thread-safe... IMHO.

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