Bug#568607: libogg-vorbis-perl: dup syscall yields fd leak
Vincent Lefevre
vincent at vinc17.net
Sat Feb 6 20:59:24 UTC 2010
reassign 568607 libogg-vorbis-perl
found 568607 libogg-vorbis-perl/0.05.ds1-1+b1
thanks
On 2010-02-06 04:32:37 +0100, Vincent Lefevre wrote:
> I have a script that uses XML::LibXML that takes more and more memory
> and ends up with a segmentation fault (before the memory is exhausted,
> though).
>
> Note: I have the same memory leak problem under Mac OS X (with
> perl 5.8 -- so, perl 5.10 is not the cause) without the segmentation
> fault, while I had no such problems in the past.
>
> If this is not a known bug, I'll have do to more tests, but it will be
> a bit difficult to produce a simple testcase.
In fact it seems that the problem (at least the segmentation fault)
comes from libogg-vorbis-perl.
With the following testcase, if I provide any (non-corrupt) ogg file
as an argument, I get a segmentation fault after the number 1021 is
printed. Actually the cause is that a file descriptor is created by
the dup syscall at each iteration and is never closed, as shown by
strace.
----------------------------------------
#!/usr/bin/env perl
use strict;
use Ogg::Vorbis;
my $oggfile = shift;
my $ctr = 0;
while (1)
{
print ++$ctr, "\n";
open OGG, '<', $oggfile or die;
my $ogg = Ogg::Vorbis->new;
$ogg->open(*OGG);
my $com = $ogg->comment;
close OGG or die;
}
----------------------------------------
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
More information about the pkg-perl-maintainers
mailing list