This reminds me of https://rt.perl.org/Ticket/Display.html?id=132004

On 2015-03-27 15:01:38, drf...@pobox.com wrote:
> OS: Ubuntu 14.04 LTS on VirtualBox
> Host: Windows 8, dual Core i5
>
> Rakudo version: current as of 3/25/2015
>
> This edge case invokes the OOM killer on my test machine. It requires at
> least one level of nesting, and is probably analogous to the exponential
> backtracking in the '(a(a(a(...)*)*)*)' regular expression, although
> that expression will terminate. I don't think this one does :) It is a
> fairly extreme edge case, but if I did this by accident I'm sure someone
> else will. It also feels like something not resetting pos() after
> backtracking, but I don't claim to know the new regex's internals.
>
> The code is here:
> --cut here--
> grammar Bug {
> token blank { \s* }
> token TOP { <blank>* }
> }
> Bug.parse('');
> --cut here--

Reply via email to