This is the mail archive of the
mailing list for the Cygwin project.
Re: ftp crash with latest inetutils and cygwin 1.5
- From: Christopher Faylor <cgf-rcm at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 31 Aug 2003 01:45:04 -0400
- Subject: Re: ftp crash with latest inetutils and cygwin 1.5
- References: <firstname.lastname@example.org>
- Reply-to: cygwin at cygwin dot com
On Sat, Aug 30, 2003 at 05:36:51PM -0400, Pierre A. Humblet wrote:
>The following is 100% reproducible with ftp from inetutils
>1.3.2-23 and -24, and any Cygwin 1.5.X.
>I have not tried other combinations.
>Note the mispelling of the site in the initial command.
>~: ftp mysite.verzion.net
>ftp: connect to address 126.96.36.199: Connection refused
>ftp: connect to address 188.8.131.52: Connection refused
>ftp: connect to address 184.108.40.206: Connection refused
>ftp: connect to address 220.127.116.11: Connection refused
>ftp: connect: Connection refused
>ftp> open mysite.verizon.net
>Segmentation fault (core dumped)
>Here is the stack
>#1 0x61043c54 in dlfree (mem=0x980828) at
>#2 0x6104c20a in free_hostent_ptr(hostent*&) (p=@0x610fd62c) at
>#3 0x6104c57b in cygwin_gethostbyname (name=0x413ef5 "mysite.verizon.net")
>CYGWIN_ME-4.90 hpn5170x 1.5.3(0.90/3/2) 2003-08-30 14:50 i686 unknown
Ok. I finally duplicated the problem and tracked this down. It looks
like inetutils is incrementing the h_addr_list structure in a static
hostent structure and then cygwin tries to free that incremented
address, causing malloc to become confused.
I know how to fix it but it's too late to do it right now.
My plan is to allocate the memory for these char ** arrays
contiguously and avoid using the internal structure pointers
directly. If this makes sense to anyone and you want to submit
a patch or check in a fix, feel free. Othewise, I'll get to this
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html