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

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

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
February 9, 2020 17:52
Subject:
Re: Backporting ac3afc4b35 (regcomp.c: make \K+ and \K* illegal.)
Message ID:
b78ad09d-9e2e-415a-acae-95ab36f83b3f@www.fastmail.com
On Sat, Feb 8, 2020, at 9:06 PM, demerphq wrote:
> 
> On Sun, 9 Feb 2020, 05:38 Ricardo Signes, <perl.p5p@rjbs.manxome.org> 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.

-- 
rjbs
Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About