Skip Menu |
Report information
Id: 77170
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: gfldex <wenzel.peppmeyer [at] gmx.de>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: 'maximum recursion depth exceeded' comes with complete stack trace
Date: Wed, 11 Aug 2010 21:18:09 +0200
To: rakudobug [...] perl.org
From: Wenzel Peppmeyer <wenzel.peppmeyer [...] gmx.de>
Download (untitled) / with headers
text/plain 501b
If somebody comes up with the brilliant idea (or has to) increase the recursion limit, hitting the max recursion depth will force a huge stacktrace that can't be stopped by ctrl-c. Closing the terminal window ain't be fun either. It might be worth it to skip the stacktrace in that case or (if that is even possible) to check how big the stacktrace would be before dumping it. -- Nobody knows the age of the human race, but everybody agrees that it is old enough to know better. -- Anonymous
Download (untitled) / with headers
text/plain 173b
Here's a simple program if you're lazy and want to cut and paste something to test: sub recursion($a) { recursion($a) } recursion("see also"); -- Will "Coke" Coleda
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 483b
On Tue Aug 17 21:46:38 2010, coke wrote: Show quoted text
> Here's a simple program if you're lazy and want to cut and paste > something to test: > > > > sub recursion($a) { > recursion($a) > } > > recursion("see also"); >
That example (with the bad prototype stripped) just gives me: perl(5674) malloc: *** mmap(size=1541115904) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug Out of memory! in 5.10.1. -- Father Chrysostomos
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 631b
On Sat Nov 19 18:56:22 2011, sprout wrote: Show quoted text
> On Tue Aug 17 21:46:38 2010, coke wrote:
> > Here's a simple program if you're lazy and want to cut and paste > > something to test: > > > > > > > > sub recursion($a) { > > recursion($a) > > } > > > > recursion("see also"); > >
> > That example (with the bad prototype stripped) just gives me: > > perl(5674) malloc: *** mmap(size=1541115904) failed (error code=12) > *** error: can't allocate region > *** set a breakpoint in malloc_error_break to debug > Out of memory! > > in 5.10.1. >
FYI, this ticket is for Perl 6, where the prototype is valid. -- Will "Coke" Coleda
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 431b
On Tue Aug 17 21:46:38 2010, coke wrote: Show quoted text
> Here's a simple program if you're lazy and want to cut and paste > something to test: > > > > sub recursion($a) { > recursion($a) > } > > recursion("see also");
BTW, I am having a really hard time on moar making this crash. I added some debug output to show the number of invocations on moar. Got up to 10000000 invocations before I got bored and killed it. -- Will "Coke" Coleda
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 427b
On Sat Aug 29 04:31:00 2015, coke wrote: Show quoted text
> BTW, I am having a really hard time on moar making this crash. I added > some debug output to show the number of invocations on moar. > > Got up to 10000000 invocations before I got bored and killed it.
Here's a sample showing the iterations. sub recursion($a) { my $c = $++; $c %% 100_000 && say $c; recursion($a); } recursion("see also"); -- Will "Coke" Coleda


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org