cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl crashing on QNX6.3 app

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 7 Sep 2006 10:41:04 -0700

On Thu, Sep 07, 2006 at 04:02:02PM +0100, Bentham, David wrote:
> The differences are that the crashing app is far more complex with 50-60
> threads, and is generally a 'busy' application, and the non-crashing app is
> quite simple, a handful of threads (<10) and is normally idle. On both, all
> the FTP action is handled within one single dedicated thread, and the crash
> occurs before any transfer has occurred.

I noticed a couple things in the source. When curl_global_init(init_flags)
is called, init_flags is 0, not CURL_GLOBAL_ALL as is documented. Also,
it's not clear what your thread design is, but if this code is running in
several threads, it's wrong; the documentation for curl_global_init
prohibits it. Also, libcurl uses fread internally to do the file reads, so
if fread() isn't thread safe (specifically, if libcurl was compiled with a
non-thread-safe version), you'll have problems as well.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2006-09-07