|Date:||Sat, 20 Dec 2014 22:10:12 +0100|
|Subject:||[BUG] /+/ is invalid as a literal regex, but causes an infinite loop when passed in as an indirect subrule call in Rakudo|
|To:||rakudobug [...] perl.org|
|From:||Carl Mäsak <cmasak [...] gmail.com>|
<masak> heh, I think I found a bug in the regex engine :) <masak> m: /+/; say "alive" <camelia> rakudo-moar fb9127: OUTPUT«===SORRY!=== Error while compiling /tmp/MtEpSUUPer␤Quantifier quantifies nothing [...] <masak> m: my $rx = "+"; "" ~~ /<$rx>/; say "alive" <camelia> rakudo-moar fb9127: OUTPUT«Memory allocation failed; could not allocate 929136640 bytes␤» * masak submits rakudobug <masak> my assumption here is the /+/ is still a syntax error, even if it happens through an injected regex. S05 says "If the compilation of the string form fails, the error message is converted to a warning and the assertion fails." So, it shouldn't die, just fail the match. It definitely shouldn't loop forever and run out of memory.