delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/08/25/04:48:42

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; q=dns; s=default; b=Oyr
GnbSKv3yFiSZXcA4bgkceCdTN6k0P7iJ7KClmFUgEogQrARZZSQSG3TNDa1R9xJZ
rqWzfeofEfb3a1uCJPSc5lidoZuxf0NthwvODnXkITVfclM4XnmsjOn2zdg0rBgW
yZqupipOWVB0MEeZ7oOKOuP1dLnDTCYq+3SCGN9U=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; s=default; bh=j4wBkISTZ
WSTb96O5OKIjmdGQkc=; b=Jt7bLmYlTstBiXI+C4f6X+QWib89qhb0I4JFTMuuM
PNgSIABGIIMuhuM13qCeHO6LE/Ey0BicRkCs+Frykn78n0r+EEPyuCkDpaE9fSdC
O221Mvjb46BTOSNToTsY31sPwdoeRfFxlvagofunoZONwPT4EOXbosXeqJIDiQEL
yo=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
From: Luke Goodsell <Luke DOT Goodsell AT ogt DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Perl Term::ReadKey from empty scalar Segfaults under cygwin only (1.7.32 x86_64)
Date: Tue, 25 Aug 2015 08:48:19 +0000
Message-ID: <59C49FE16E416F46873F86D530DA80520BD519@ExchangeServer.internal.ogtip.com>
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t7P8maxP002036

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 string, works fine.

Example command:

> perl -MTerm::ReadKey -e 'my $input = ""; open(my $stdin, "<", \$input) or die "failed to open: $!"; local *STDIN = $stdin; ReadMode "raw"; my $response = 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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019