cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Repeatable crash in Curl_llist_insert_next and debugging

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Sat, 26 Jul 2008 11:50:43 -0700

On Sat, Jul 26, 2008 at 12:26:12PM -0500, Wade Williams wrote:
> I've got a 100% repeatable crash (bus error) in Curl_llist_insert_next().
>
> I'm using curl 7.18.2, on Mac OS X 10.5.4:

Did you compile the binary yourself or was it precompiled? Are you using
c-ares or not?

> Here's the backtrace:
>
> (gdb) bt
> #0 0x003080af in Curl_llist_insert_next ()
> #1 0x003085f2 in Curl_hash_add ()
> #2 0x002eb82f in Curl_cache_addr ()
> #3 0x002ebade in Curl_resolv ()
> #4 0x002fc5e1 in Curl_connect ()
> #5 0x00306268 in Curl_perform ()
> #6 0x0000484b in download_file (url=0x413080 "http://mapserver.flightgear.org/
> dlaction.psp?xmin=-120.937500&xmax=-118.125000&ymin=33.750000&ymax=36.562500&
> pgislayer=v0_irrcroppasturecover", filename=0x17f656 "shape.tmp")
>
> Here's the code:
>
> if( !(fp = openfile( filename, "wb" )) )
> return false;
>
> // set the url to download
> curl_easy_setopt( curl, CURLOPT_URL, url );
>
> // write to our file pointer
> curl_easy_setopt( curl, CURLOPT_WRITEDATA, fp );
>
> if( !curl_easy_perform( curl ) )
>
>
> fp is valid, curl is valid and you can see that url is valid and the value
> above.
>
> I'm guessing it's not possible to determine a fix from the above. I want to
> submit a quality bug report, so I've been trying to turn on debugging for
> libcurl. I've tried using --enable-debug on configure and CFLAGS=-g -O0 but
> I'm still not getting source in the debugger.
>
> Any suggestions on additional flags that need to be enabled for debugging or
> solutions to the crash?

Try --disable-shared to link the binary statically. It might also be that
your self-compiled curl binary with debug symbols is using an old dynamic
libcurl sitting elsewhere on your system. Not only could that cause problems
with debugging, but it could also mean that you're encountering a bug that
has long ago been fixed. See what 'ldd yourapp' (or the Mac OS X equivalent
to ldd) says about which shared libraries its using. In any case, using
--disable-shared, or linking your app with `curl-config --shared-libs`
should solve that problem.

>>> Dan

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