# New Ticket Created by Alex Jakimenko # Please include the string: [perl #127253] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=127253 >
The most simple case is: <AlexDaniel> m: sub foo() { return foo }; say foo <camelia> rakudo-moar 5ed58f: OUTPUT«Memory allocation failed; could not allocate 37888 bytes» But there are other more interesting ones. Like this: <AlexDaniel> m: sub foo($x = foo) { 42 }; say foo; <camelia> 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.