Raku / old-issue-tracker

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

error message on deep recursions #5044

Open p6rt opened 8 years ago

p6rt commented 8 years ago

Migrated from rt.perl.org#127253 (status was 'new')

Searchable as RT127253$

p6rt commented 8 years ago

From @AlexDaniel

The most simple case is​:

\ m​: sub foo() { return foo }; say foo \ rakudo-moar 5ed58f​: OUTPUT«Memory allocation failed; could not allocate 37888 bytes␤»

But there are other more interesting ones. Like this​:

\ m​: sub foo($x = foo) { 42 }; say foo; \ rakudo-moar 5ed58f​: OUTPUT«Memory allocation failed; could not allocate 14597464 bytes␤»

I'm not sure where does this error come from, but the problem is that it is the same result that you would get on any other memory allocation problem.

Perhaps there is a way to say something like “Deep recursion detected”? Or maybe we should have some constant recursion limit?

Current error message is LTA, I hope that there is a way to make it better.