This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Perl Term::ReadKey from empty scalar Segfaults under cygwin only (1.7.32 x86_64)
- From: Luke Goodsell <Luke dot Goodsell at ogt dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Tue, 25 Aug 2015 08:48:19 +0000
- Subject: Perl Term::ReadKey from empty scalar Segfaults under cygwin only (1.7.32 x86_64)
- Authentication-results: sourceware.org; auth=none
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