Bug#528332: memory leak on perl 5.10

Dmitry E. Oboukhov unera at debian.org
Tue May 12 08:24:35 UTC 2009


Package: perl
Version: 5.10.0-19
Severity: grave

I've tested this script (see below) under perl 5.8.8 and 5.8.8 does
not has memory leak.

For reproducing this bug i wrote an easy script:

$ cat test.pl
#!/usr/bin/perl

use warnings;
use strict;

sub get_set
{
    our @set = map { int rand 1000 } 0 .. 50;
    return \@set;
}

{
    my $set = get_set;
    printf "%s\n", join ", ", @$set;
    redo;
}


If we run test.pl under perl 5.8, then it will allocate 832 kB DATA
memory and can work for a long time (my test worked two hours, but 832
kb was remained all this time)

If we run test.pl under debian/stable, perl 5.10, then
expenditure of memory will constantly go up.

This bug makes impossible using processes which need a long time to
fulfil

PS: Typical get_set is replaced to 'new s-Object'
and return \@set is replaced to 'bless $link, $class'

--
... mpd is off

. ''`.                               Dmitry E. Oboukhov
: :’  :   email: unera at debian.org jabber://UNera@uvw.ru
`. `~’              GPGKey: 1024D / F8E26537 2006-11-21
  `- 1B23 D4F8 8EC0 D902 0555  E438 AB8C 00CF F8E2 6537
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20090512/7aa4563a/attachment.pgp>


More information about the Perl-maintainers mailing list