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" after making a Malformed routine definition #1240

Closed
p6rt opened this issue Aug 21, 2009 · 7 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Aug 21, 2009

Migrated from rt.perl.org#68710 (status was 'resolved')

Searchable as RT68710$

@p6rt
Copy link
Author

p6rt commented Aug 21, 2009

From @carbin

sub foo; # wrong ofc
Malformed routine definition at line 1, near "foo; # wro"
in Main (src/gen_setting.pm​:3425)
foo
maximum recursion depth exceeded
in Main (<unknown>​:1)

Confirmed by​:

<jnthn> Can reproduce it here too.
<PerlJam> carlin​: that's what I get too.

--
Carlin

@p6rt
Copy link
Author

p6rt commented Jul 12, 2010

From @bbkr

On Kiev build

$ perl6

sub foo; # wrong ofc
Could not find sub &foo

But such declaration should fail according to STD​:

[18​:01] <p6eval> std 31642​:
OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Malformed block at /tmp/C2QFrAHCvC
line 1​:␤------> �[32msub foo�[33m⏏�[31m;�[0m␤ expecting any of​:␤ new
name to be defined␤ routine_def␤ trait␤Parse failed␤FAILED 00​:01
110m␤»

so leaving unchanged

@p6rt
Copy link
Author

p6rt commented Jul 12, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jul 12, 2010

From @carbin

On Mon Jul 12 09​:02​:28 2010, bbkr wrote​:

But such declaration should fail according to STD​:

Indeed it should, hence my comment "# wrong ofc".

The bug is that attempting to call a misdecleared subroutine should not
result in a maximum recursion depth error, AFAIK it should fail at the
malformed declaration.

If running "sub foo;" and then calling "foo;" on the REPL no longer
causes that error then this is probably already fixed. However, I don't
have Rakudo installed so I can't test it.

--
Carlin

@p6rt
Copy link
Author

p6rt commented Sep 29, 2011

From @jnthn

On Mon Jul 12 09​:23​:58 2010, carlin wrote​:

On Mon Jul 12 09​:02​:28 2010, bbkr wrote​:

But such declaration should fail according to STD​:

Indeed it should, hence my comment "# wrong ofc".

The bug is that attempting to call a misdecleared subroutine should not
result in a maximum recursion depth error, AFAIK it should fail at the
malformed declaration.

If running "sub foo;" and then calling "foo;" on the REPL no longer
causes that error then this is probably already fixed. However, I don't
have Rakudo installed so I can't test it.

Just checked latest Rakudo and...

sub foo;
Missing block at line 1, near ";\n"
foo
Could not find sub &foo

So, better.

/jnthn

@p6rt
Copy link
Author

p6rt commented Mar 2, 2012

From @moritz

Now tested in S32-exceptions/misc.t

@p6rt
Copy link
Author

p6rt commented Mar 2, 2012

@moritz - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant