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

Re: [perl #130561] Coredump in Perl_re_op_compile

Thread Previous | Thread Next
From:
Karl Williamson
Date:
January 26, 2017 04:27
Subject:
Re: [perl #130561] Coredump in Perl_re_op_compile
Message ID:
2e75da74-8337-e046-f1ca-aab412d17c0d@khwilliamson.com
On 01/25/2017 08:47 AM, Hugo van der Sanden via RT wrote:
> On Sun, 22 Jan 2017 04:48:49 -0800, randir wrote:
>> Before v5.18.0, this'd just die() during a regex compilation. It was
>> either exposed or caused by the following commit:
>>
>> 31c15ce5372b770c3ca899df6cf102f1ed6866ba is the first bad commit
>> commit 31c15ce5372b770c3ca899df6cf102f1ed6866ba
>> Author: Karl Williamson <public@khwilliamson.com>
>> Date:   Sat Sep 15 12:27:22 2012 -0600
>>
>> PATCH: [perl #82954] Make "Can't do {n,m} with n > m into warning
>>
>> This commit now causes this situation to warn instead of dying.  The
>> portion of the regular expression that can't match is optimized into
>> an
>> OPFAIL.
>
> Yes, this change falls foul of:
>     /* Do setup, note this code has side effects beyond
>      * the rest of this block. Specifically setting
>      * RExC_recurse[] must happen at least once during
>      * study_chunk(). */
> .. since it optimizes away the node we must still study.
>
> Karl, do you see any problem with just removing the optimizing aspect, per the attached patch? If not, I'll wrap in a test and commit.

I see no problems.  Too bad that comment in the file is buried
>
> Hugo
>
> ---
> via perlbug:  queue: perl5 status: new
> https://rt.perl.org/Ticket/Display.html?id=130561
>

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