https://bugzilla.redhat.com/show_bug.cgi?id=1011333
Bug ID: 1011333 Summary: PerlIO::via leaks a foreign memory Product: Fedora Version: 18 Component: perl Assignee: jplesnik@redhat.com Reporter: ppisar@redhat.com QA Contact: extras-qa@fedoraproject.org CC: cweyl@alumni.drew.edu, iarnell@gmail.com, jplesnik@redhat.com, kasal@ucw.cz, perl-devel@lists.fedoraproject.org, ppisar@redhat.com, psabata@redhat.com, rc040203@freenet.de, tcallawa@redhat.com
This simple test:
#!/usr/bin/perl use strict; use warnings; #use utf8;
{ package PerlIO::via::Bug;
sub PUSHED { return bless {}, $_[0]; } sub READ { return $_[2]; } }
open my $fh, '<:raw:via(Bug)', '/dev/null' or die "Cannot open, $! $?"; read $fh, ( my $buf ), 1024; print $buf;
accesses foreign data (and puts them into $buf and prints them). All perls are affected, the specific output depends on perl version and on the "use utf8" pragma. Valgrinds warns on write(2) with uninitialized memory.
Reported to upstream as https://rt.perl.org/rt3//Public/Bug/Display.html?id=119961.
All Fedoras are affected.