From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115122 invoked by alias); 25 Aug 2015 08:48:27 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 115109 invoked by uid 89); 25 Aug 2015 08:48:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.7 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: mx1.ogt.co.uk Received: from mx1.ogt.co.uk (HELO mx1.ogt.co.uk) (213.1.212.91) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 25 Aug 2015 08:48:25 +0000 Received: from [192.168.0.3] (port=63139 helo=mail.ogt.co.uk) by mx1.ogt.co.uk with esmtps (TLSv1:AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1ZU9u0-0006u2-11 for cygwin@cygwin.com; Tue, 25 Aug 2015 09:48:20 +0100 Received: from ExchangeServer.internal.ogtip.com ([fe80::3172:5dd:b7db:487b]) by ExchangeServer.internal.ogtip.com ([fe80::3172:5dd:b7db:487b%20]) with mapi id 14.03.0123.003; Tue, 25 Aug 2015 09:48:20 +0100 From: Luke Goodsell To: "cygwin@cygwin.com" Subject: Perl Term::ReadKey from empty scalar Segfaults under cygwin only (1.7.32 x86_64) Date: Tue, 25 Aug 2015 08:48:00 -0000 Message-ID: <59C49FE16E416F46873F86D530DA80520BD519@ExchangeServer.internal.ogtip.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00420.txt.bz2 Hi, Please can you help me to diagnose this issue? Attempting Perl Term::ReadKey from an empty string under Cygwin causes perl= to segmentation fault. The same command on Debian, or with a non-empty str= ing, works fine. Example command: > perl -MTerm::ReadKey -e 'my $input =3D ""; open(my $stdin, "<", \$input) = or die "failed to open: $!"; local *STDIN =3D $stdin; ReadMode "raw"; my $r= esponse =3D ReadKey(1, \*STDIN); ReadMode "normal"; print "Got \"$response\= "\n";' Response under cygwin: > Segmentation fault (core dumped) Response under Debian: > Got "" Changing $input to anything non-empty works properly. Cygwin dll version: 1.7.32 Perl version: 5.14.4 Term::ReadKey version: 2.33 Kind regards, Luke -- 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