develooper Front page | perl.perl5.porters | Postings from April 2003

[perl #21969] Very simple and looks like a bug...

Thread Next
From:
perlbug-followup
Date:
April 16, 2003 18:37
Subject:
[perl #21969] Very simple and looks like a bug...
Message ID:
rt-21969-55206.6.74357732273123@bugs6.perl.org
# New Ticket Created by  xlaboratory@aol.com 
# Please include the string:  [perl #21969]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=21969 >


Very simple and looks like a bug...

I tried this using perl 5.6 and 5.8 on SUN and Linux. The following code always cause "Segmentation fault" if you are going to produce upto 500K recursive calls, in the same time 100K iterations works fine. BTW... The same C sample works fine. 

The code is below...

##################################
sub count($$) {

        my( $i, $i_max) = @_;

        count($i, $i_max) if( ++$$i < $i_max );

        return;
}

my $i;
my $i_max = 500000;

print "Start\n";

count(\$i, $i_max);

print "Stop: $i iterations...\n";

exit;
#############################################


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About