develooper Front page | perl.perl5.porters | Postings from July 2014

[perl #52786] Crash Perl with binmode(STDERR, ':encoding(wildlybad)')

From:
Alexandr Ciornii via RT
Date:
July 26, 2014 18:50
Subject:
[perl #52786] Crash Perl with binmode(STDERR, ':encoding(wildlybad)')
Message ID:
rt-4.0.18-16075-1406400620-1443.52786-15-0@perl.org
On Mon Apr 14 11:02:25 2008, toddolson wrote:
>        perl -e "binmode(STDERR, ':encoding(wildlybad)')
>     the print statements are just there to suggest that binmode does
> not return

with perl 5.20.0

>perl -e "binmode(STDIN, ':encoding()')"
Cannot find encoding "" at -e line 1.

>perl -e "binmode(STDERR, ':encoding()')"

>perl a.pl
Error: Can't call method "encode" on an undefined value at a.pl line 2.

a.pl:
eval {
 binmode(STDERR, ':encoding()');
};
print "Error: $@";


So, binmode(STDERR, ':encoding()') does not raise a error in time and STDERR starts behaving incorrectly.

-- 
Alexandr Ciornii, http://chorny.net


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=52786



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About