cURL / Mailing Lists / curl-users / Single Mail

curl-users

Crash on FTP and --dump-header

From: Ben Madsen <bmadsen_at_ecbridges.com>
Date: Fri, 02 Sep 2005 13:46:04 -0700

First off, hello to everyone. I wanted to express my appreciation for
such a solid program and library set. Truly a great resource to work with.

I came acrossed a problem that I was hoping somebody here could help me
with, however. I've search Google, and the curl mailing lists and
couldn't seem to find anything. I'm trying to use the --dump-header
option on the command line curl client with the FTP protocol. On my
HP-UX systems it works fine. However, on my Linux based platforms
(using glibc) I get the following crash at the end of the program:

*** glibc detected *** corrupted double-linked list: 0x0806f2f8 ***
Aborted

The dump file is written correctly and I can get the ftp response I am
looking for whether it is a directory listing or the actual file.
However, the return code ends up being 2 indicating a problem instead of
a successful transaction, throwing my script off... There are other
cases where a 2 error should be caught however, so I can't just ignore
the return code.

I have tested this using 7.14.0 and 7.12.3 on Fedora with the problem
showing up and 7.13.0 on HP-UX with no problems.

I also ran the curl client against valgrind's memcheck tool and got the
following stack trace and similar reports:
==4615== Invalid read of size 2
==4615== at 0xAB1E9B: fwrite (in /lib/libc-2.3.5.so)
==4615== by 0x8049BC8: (within /usr/bin/curl)
==4615== by 0x4FA7D7C: Curl_client_write (in /usr/lib/libcurl.so.3.0.0)
==4615== by 0x4FAA015: (within /usr/lib/libcurl.so.3.0.0)
==4615== by 0x4FAB8EC: (within /usr/lib/libcurl.so.3.0.0)
==4615== by 0x4FABA22: Curl_ftp_disconnect (in /usr/lib/libcurl.so.3.0.0)
==4615== by 0x4FAD927: Curl_disconnect (in /usr/lib/libcurl.so.3.0.0)
==4615== by 0x4FAF3CD: (within /usr/lib/libcurl.so.3.0.0)
==4615== by 0x4FAF424: Curl_close (in /usr/lib/libcurl.so.3.0.0)
==4615== by 0x4FBC8D0: curl_easy_cleanup (in /usr/lib/libcurl.so.3.0.0)
==4615== by 0x804F37A: (within /usr/bin/curl)
==4615== by 0xA70D5E: __libc_start_main (in /lib/libc-2.3.5.so)
==4615== Address 0x1B95CBC0 is 0 bytes inside a block of size 352 free'd
==4615== at 0x1B909743: free (vg_replace_malloc.c:152)
==4615== by 0xAB0C3F: fclose@@GLIBC_2.1 (in /lib/libc-2.3.5.so)
==4615== by 0x804F355: (within /usr/bin/curl)
==4615== by 0xA70D5E: __libc_start_main (in /lib/libc-2.3.5.so)
==4615== by 0x8049890: (within /usr/bin/curl)

Any help would be much appreciated, even if it was a "look here for the
possible cause."

Regards,
Ben

Received on 2005-09-02