Open p6rt opened 14 years ago
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
@coke - Status changed from 'new' to 'open'
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
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.
--
Father Chrysostomos
On Sat Nov 19 18:56:22 2011, sprout wrote:
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
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");
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
On Sat Aug 29 04:31:00 2015, coke wrote:
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
Migrated from rt.perl.org#77170 (status was 'open')
Searchable as RT77170$