Perl Term::ReadKey from empty scalar Segfaults under cygwin only (1.7.32 x86_64)

Luke Goodsell
Tue Aug 25 08:48:00 GMT 2015


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,

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list