cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Segmentaion Faults!

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 22 Oct 2003 13:44:23 +0200 (CEST)

On Tue, 21 Oct 2003, jna wrote:

> (gdb) run http://www.google.com
> Starting program: /usr/local/bin/curl http://www.google.com
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x219e in ?? () at eval.c:88
> 88 }
> (gdb) bt
> #0 0x219e in ?? () at eval.c:88
> #1 0x4003da0e in _nss_files_gethostbyname_r () at eval.c:88
> #2 0x402ad11b in __gethostbyname_r (name=0x8081b70 "www.google.com",
> resbuf=0x8082218, buffer=0x808222c "",
> buflen=180, result=0xbffff3d4, h_errnop=0xbffff3d8) at
> ../nss/getXXbyYY_r.c:200
> #3 0x4001cf71 in my_getaddrinfo (data=0x806d088, hostname=0x8081b70
> "www.google.com", port=80,
> bufp=0xbffff414) at hostip.c:619

Nice backtrace.

Hm, this looks like a bad gethostbyname_r() in your glibc. What version of
glibc do you have? (ldd --version shows it). Can you try to increase the
initial value of the variable step_size? (It is within the my_getaddrinfo()
function a few lines above the gethostbyname_r() call). It starts at 200 and
gets increased if found out to be too small, but apparently this crash happens
on the first run (as 'buflen' shown above is 180). It seems as if the function
crashes instead of returning ERANGE.

> > Lovely. :-(
>
> Yeah I know I hate having to not being able to use updated stuff :(

I was also thinking about the fact that these guys obviously have found some
kind of bug in later curl versions that we don't know about and thus haven't
fixed.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
Received on 2003-10-22