develooper Front page | perl.perl6.compiler | Postings from June 2012

[perl #90522] [BUG] Many nested evals cause Rakudo to exit spontaneously without any sign of error

From:
Will Coleda via RT
Date:
June 30, 2012 07:53
Subject:
[perl #90522] [BUG] Many nested evals cause Rakudo to exit spontaneously without any sign of error
Message ID:
rt-3.6.HEAD-28836-1341067998-593.90522-15-0@perl.org
On Fri May 13 02:46:27 2011, masak wrote:
> <masak> rakudo: my $i; sub foo { say $i if ++$i %% 50; eval "foo" };
> foo # jnthn++ for suggesting this<p6eval> rakudo 678ad3:
> OUTPUT«50␤100␤150␤»
> <masak> locally, it goes up to 194 and then dies without a peep.
> * masak submits rakudobug
> <jnthn> heh
> <mathw> I hope nobody's planning on using eval like that in real code!
> <masak> it's not about normal usage; it's about abnormal usage.
> <jnthn> It won't be high on my list of things to fix :P
> 
> There's no error output, and the exit code after doing this is 0, so
> there's absolutely no sign that anything has gone wrong.

Fixed:

$ ./perl6
> pir::getinterp__P().recursion_limit(100);
100000
> my $i; sub foo { say $i if ++$i %% 5; eval "foo" };
sub foo() { ... }
> foo
5
10
maximum recursion depth exceeded

Closable with tests. (dangerous, dangerous tests. ;)

-- 
Will "Coke" Coleda



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About