develooper Front page | perl.perl5.porters | Postings from January 2017

Re: [perl #130561] Coredump in Perl_re_op_compile

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
January 28, 2017 10:30
Subject:
Re: [perl #130561] Coredump in Perl_re_op_compile
Message ID:
20170128103050.GA28583@iabyn.com
On Fri, Jan 27, 2017 at 10:25:22AM +0100, demerphq wrote:
> So fixed in:
> 
> commit 31fc93954d1f379c7a49889d91436ce99818e1f6
> Author: Yves Orton <demerphq@gmail.com>
> Date:   Fri Jan 27 10:18:51 2017 +0100
> 
>     fix RT #130561 - recursion and optimising away impossible
> quantifiers are not friends
> 
>     Instead of optimising away impossible quantifiers like (foo){1,0} treat them
>     as unquantified, and guard them with an OPFAIL. Thus /(foo){1,0}/ is treated

That commit makes pat_rt_report.t produce noise on stderr:

    $ ./perl -Ilib t/harness t/re/pat_rt_report.t
    re/pat_rt_report.t .. Quantifier {n,m} with n > m can't match in regex; marked by <-- HERE in m/(foo){1,0} <-- HERE |(?1)/ at re/pat_rt_report.t line 1140.
    re/pat_rt_report.t .. ok         
    All tests successful.
    Files=1, Tests=2504,  2 wallclock secs ( 0.33 usr  0.00 sys +  1.18 cusr  0.03 csys =  1.54 CPU)
    Result: PASS

Presumably 'no warnings "regex"' or similar is called for here?


-- 
Art is anything that has a label (especially if the label is "untitled 1")

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