develooper Front page | perl.perl5.porters | Postings from February 2020

Re: Backporting ac3afc4b35 (regcomp.c: make \K+ and \K* illegal.)

Thread Previous | Thread Next
Ricardo Signes
February 9, 2020 17:52
Re: Backporting ac3afc4b35 (regcomp.c: make \K+ and \K* illegal.)
Message ID:
On Sat, Feb 8, 2020, at 9:06 PM, demerphq wrote:
> On Sun, 9 Feb 2020, 05:38 Ricardo Signes, <> wrote:__
>> $ perl5.30.1 -E 'if (0) { /\K+/ } say "ok 1"'
>> ok 1
>> ~/code/perl5$ ./perl -I lib -E 'if (0) { /\K+/ }'
>> \K+ is forbidden - matches null string many times in regex; marked by <-- HERE in m/\K+ <-- HERE / at -e line 1.
>> -1 on applying this to maint.
> Shrug. I think this is a toy example and the test cases produce a far more dangerous outcome than this.

I did not mean to imply that this literal code was the actual counterargument.

This example stands in for any very simple case in which a pattern light that might be currently getting compiled, but not executed, in existing code. The problematic runtime behavior has existed v5.10.0, and is not a recent regression.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About