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

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

Alexandr Ciornii via RT
July 26, 2014 18:50
[perl #52786] Crash Perl with binmode(STDERR, ':encoding(wildlybad)')
Message ID:
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()')"

Error: Can't call method "encode" on an undefined value at line 2.
eval {
 binmode(STDERR, ':encoding()');
print "Error: $@";

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

Alexandr Ciornii,

via perlbug:  queue: perl5 status: open Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About