develooper Front page | perl.perl5.porters | Postings from August 2013

[perl #38416] 5.8.0 pure-perl program dumps core

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
August 3, 2013 17:15
Subject:
[perl #38416] 5.8.0 pure-perl program dumps core
Message ID:
rt-3.6.HEAD-2552-1375550137-1335.38416-15-0@perl.org
On Sat Aug 03 09:21:48 2013, jkeenan wrote:
> On Fri Feb 03 14:06:16 2006, abigail@abigail.nl wrote:
> > On Thu, Feb 02, 2006 at 07:11:40PM -0800, Mark-Jason Dominus wrote:
> > > 
> > > I don't have anything more recent than 5.8.0 to try this with.  Can
> > > someone please check to see if it segfaults with a more recent version
> > > than that?
> > 
> > 
> > With 5.8.[678], and 5.9.[23], the program eventually runs out of memory,
> > finishing with 'Killed'.
> > 
> > With 5.004_04, 5.005_0[34], 5.6.[012], 5.8.[012345], and 5.9.1, the
> program
> > dies with a quick 'Segmentation fault'. 
> > 
> > 5.9.0 dies with "Bizarre copy of ARRAY in sassign at
> > /opt/perl/5.9.0/lib/5.9.0/Memoize.pm line 220".
> > 
> > 5.004_05, 5.005, and 5.005_0[12] the program gives me "Anonymous
function
> > called in forbidden scalar context; faulting at /tmp/x line 29".
> > 
> > And 5.000 won't compile Memoize.pm.
> > 
> > 
> > 
> > Abigail
> 
> With Perl 5.18.0, I get:
> 
> #####
> $ perl -w 38416_memoize.pl 
> Deep recursion on subroutine "Memoize::_memoizer" at (eval 1) line 1.
> Deep recursion on subroutine "main::is_prime" at
> /usr/local/lib/perl5/5.18.0/Memoize.pm line 245.
> Deep recursion on subroutine "main::calculate_all_primes" at
> 38416_memoize.pl line 16.
> Out of memory!
> Killed
> #####
> 
> Now, given that we supply three warnings about this program, can we
> reasonably argue that this is a bug in Perl?

The bug (that perl used to crash) has been fixed.  That the script
causes infinite recursion is not a bug in perl.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=38416

Thread Previous | 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