-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weirdness on negative char class “[ ]” #1622
Comments
Originally reported on https://rt.perl.org/Ticket/Display.html?id=130586#ticket-history |
OK, but new comments here please. Closing RT#130586 in favor of this ticket. |
It appears that it expects a Fixes [Rakudo Issue #1622](rakudo/rakudo#1622)
Check that there is at least one character class before applying the regex nodes. When compiling the 'conj' regex node, it expects to be able to shift off at least one child node and iterates past the end as a result. Fixes [Rakudo Issue #1622](rakudo/rakudo#1622)
I've submitted a PR for NQP that addresses the issue at Raku/nqp#432. I attempted to have it return a helpful error about empty character classes as jnthn suggested in the RT thread (like so), but then NQP wouldn't build without throwing that error, so I removed it from the branch. |
Check that there is at least one character class before applying the regex nodes. When compiling the 'conj' regex node, it expects to be able to shift off at least one child node and iterates past the end as a result. Fixes [Rakudo Issue #1622](rakudo/rakudo#1622)
I've merged in the panic-less fix for this issue into the NQP repo. Still need to add tests to the roast. |
|
Tests added in Raku/roast#411, @jstuder-gh++. |
Oh wait, where's the separate panic PR? |
I've submitted the separate PR for the panic behavior here. |
Thanks. |
After WTFing for some time, I found the culprit:
/<:SomeClass-[ ]>/
.Even smaller test cases:
perl6 -v
This is Rakudo version 2018.02.1-137-g65874b1555 built on MoarVM version 2018.02-35-g1fca17994
implementing Perl 6.c.
The text was updated successfully, but these errors were encountered: