lftp 4.9.0-1 segmentation fault (core dumped)

Henry S. Thompson ht@inf.ed.ac.uk
Fri Jan 17 12:56:00 GMT 2020

Henry S. Thompson writes:

> thierry blind writes:
>> I updated lftp 4.8.4-1 to lftp 4.9.0-1 but now calling following
>> command will always core dump (I anonymized some confidential data):
> Likewise, with just lftp, no arguments at all!

OK, installed src, built it using cygport, and found the problem.

It only happens under the call to Set in the following, i.e. if the IPV6
test fails (see src/network.cc:482)

#if INET6
   // check if ipv6 is really supported
   if(!Networker::FindGlobalIPv6Address() || !CanCreateIpv6Socket())

This code is called during dll/module initialisation, at which point the
call to 'ResMgr::Set' segfaults because another static var
initialisation (resource.cc:426) hasn't happened.

It's seems likely that the upstream people, and the package maintainer,
were running on systems with IPV6 enabled, so they didn't hit the

So, the fix is for the upstream people to fix the ordering problem.

One way, perhaps not the best, to do this is in the attached patch.

Not sure if this is a cygwin problem or an upstream problem...

[The attached file contains a definite upstream fix as well, only
 triggered if you try to build with --disable-ipv6]


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lftp-ipv6-fail-fix.patch
Type: text/x-patch
Size: 2879 bytes
Desc: fix segfault in lftp
URL: <http://cygwin.com/pipermail/cygwin/attachments/20200117/21bc4e69/attachment.bin>
-------------- next part --------------
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

-------------- next part --------------

Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list