cURL / Mailing Lists / curl-users / Single Mail

curl-users

[ curl-Bugs-441610 ] --verbose & KeepAlive causes SegFault?

From: <noreply_at_sourceforge.net>
Date: Sun, 15 Jul 2001 23:50:20 -0700

Bugs item #441610, was opened at 2001-07-15 23:50
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=441610&group_id=976

Category: None
Group: crash
Status: Open
Resolution: None
Priority: 5
Submitted By: Dustin Boswell (boswell)
Assigned to: Nobody/Anonymous (nobody)
Summary: --verbose & KeepAlive causes SegFault?

Initial Comment:
doing

curl --dump-header ./curl-temp/@32687.2-cookie.txt
--stderr "./curl-temp/@32687.4.log" --output
./curl-temp/@32687.3.html --verbose --url
'http://www.pixi.com'

causes a core dump (Seg Fault) on Redhat 6.2 curl 7.8
(but if you remove the --verbose it doesn't!)

-I traced it down to the following line:
src/main.c:
  operate() calls curl_easy_cleanup()
lib/easy.c:
  curl_easy_cleanup() calls Curl_close()
lib/url.c:
  Curl_close() calls ConnectionKillOne()
lib/url.c:
  ConnectionKillOne() calls Curl_disconnect()
lib/url.c:
  Curl_disconnect() calls infof() (which is Curl_infof)
lib/sendf.c:
  Curl_info() seg faults on the line that looks like:
     vfprintf(data->err, fmt, ap);

The reason is that data->err is closed (I think).
The previous line:
  Curl_info()
     fputs("* ", data->err)

returned -1 (EOF), (I checked with a simple printf).

But this error only occurs on certain urls.
GOOD urls:
www.yahoo.com
www.ibm.com
BAD urls:
www.google.com
www.python.org
www.pixi.com

The only thing I can observe about them is that
the "bad" urls have their connects kept alive
whereas the "good" ones don't. That is, the
error file (the part of it that's written until
the segfault occurs) shows

Connection (#0) left alive #for "bad" urls
Closing live connection (#0) #for "good" urls

Does anyone know of a reason why this would
happen?

----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=441610&group_id=976
Received on 2001-07-16