Open p5pRT opened 16 years ago
Category: core
Severity: medium
Originally observed in: perl\, v5.8.6 built for MSWin32-x86-multi-thread
This problem can be replicated in perl 5.10.0 i686-linux-thread-multi.
Please check http://www.perlmonks.org/?node_id=698735 for a discussion on this.
Thanks\,
Thushan Abeysekera
Programmer Analyst
Computershare
****************************************************************************** Please visit the following website to read the Computershare legal notice: http://www.computershare.com/disclaimer/americas/en Veuillez visiter le site Web suivant afin de prendre connaissance de l'avis juridique de Computershare: http://www.computershare.com/disclaimer/americas/fr
******************************************************************************
This is a bug report for perl from thushan.abeysekera@computershare.com\, generated with the help of perlbug 1.35 running under perl v5.8.6.
----------------------------------------------------------------- There seems to be a memory leak when doing recursion with goto &sub_name syntax. Run following two endless loops and check memory usage. While script 1 runs out of memory\, script 2 runs without a problem.
use strict; test1();
sub test1 { my $v=0; if ($v = get_true()) { goto &test1; } }
sub get_true { return 1; }
use strict; test1();
sub test1 { my $v=0; $v = get_true(); if ($v) { goto &test1; } }
sub get_true { return 1; }
Originally observed in: perl\, v5.8.6 built for MSWin32-x86-multi-thread
This problem can be replicated in perl 5.10.0 i686-linux-thread-multi.
Please check http://www.perlmonks.org/?node_id=698735 for a discussion on this.
Citeren Thushan Abeysekera \perlbug\-followup@​perl\.org:
# New Ticket Created by "Thushan Abeysekera" # Please include the string: [perl #57174] # in the subject line of all future correspondence about this issue. # \<URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57174 >
This is a bug report for perl from thushan.abeysekera@computershare.com\, generated with the help of perlbug 1.35 running under perl v5.8.6.
----------------------------------------------------------------- There seems to be a memory leak when doing recursion with goto
&sub_name syntax. Run following two endless loops and check memory usage. While script
1 runs out of memory\, script 2 runs without a problem.[snip] Originally observed in: perl\, v5.8.6 built for MSWin32-x86-multi-thread
This problem can be replicated in perl 5.10.0 i686-linux-thread-multi.
Please check http://www.perlmonks.org/?node_id=698735 for a
discussion on this.
$ cat rt-57174.pl #!/usr/bin/perl -l
use strict; # use warnings;
my $mem1 = qx/ps u $$/; my ($vsz1) = $mem1 =~ m/^perl\s+\d+\s+[0-9.]+\s+[0-9.]+\s+(\d+)/m;
my $m = 0; test1();
my $mem2 = qx/ps u $$/; my ($vsz2) = $mem2 =~ m/^perl\s+\d+\s+[0-9.]+\s+[0-9.]+\s+(\d+)/m;
if ($vsz1 + 1000 \< $vsz2) { print "not ok ($vsz1 & $vsz2)"; } else { print "ok"; }
sub test1 { my $v=0; if ($v = get_true()) { if ($m++ \< 300_000) { goto &test1; } } }
sub get_true { return 1; }
__END__
(running with user 'perl')
perl-5.00504 rt-57174.pl not ok (2708 & 14568)
perl-5.10.0 rt-57174.pl not ok (3172 & 9144)
perl-blead@34156 rt-57174.pl not ok (3196 & 9172)
(No access to a system with a perl before 5.00504 atm)
Kind regards\,
Bram
The RT System itself - Status changed from 'new' to 'open'
Leak still present in bleed@35059\, Dec 2008.
Migrated from rt.perl.org#57174 (status was 'open')
Searchable as RT57174$