Raku / old-issue-tracker

Tickets from RT
https://github.com/Raku/old-issue-tracker/issues
2 stars 1 forks source link

'maximum recursion depth exceeded' comes with complete stack trace #2061

Open p6rt opened 14 years ago

p6rt commented 14 years ago

Migrated from rt.perl.org#77170 (status was 'open')

Searchable as RT77170$

p6rt commented 14 years ago

From @gfldex

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

p6rt commented 14 years ago

@coke - Status changed from 'new' to 'open'

p6rt commented 14 years ago

From @coke

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

p6rt commented 13 years ago

From @cpansprout

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

p6rt commented 13 years ago

From @coke

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

p6rt commented 9 years ago

From @coke

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

p6rt commented 8 years ago

From @coke

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