Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
p6rt opened this issue Aug 11, 2010 · 7 comments
Open

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

p6rt opened this issue Aug 11, 2010 · 7 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Aug 11, 2010

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

Searchable as RT77170$

@p6rt
Copy link
Author

p6rt commented Aug 11, 2010

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
Copy link
Author

p6rt commented Aug 18, 2010

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

@p6rt
Copy link
Author

p6rt commented Aug 18, 2010

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
Copy link
Author

p6rt commented Nov 20, 2011

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
Copy link
Author

p6rt commented Nov 21, 2011

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
Copy link
Author

p6rt commented Aug 29, 2015

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
Copy link
Author

p6rt commented Apr 7, 2016

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

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant