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

Re: [perl #130561] Coredump in Perl_re_op_compile

Thread Previous
From:
demerphq
Date:
January 27, 2017 16:05
Subject:
Re: [perl #130561] Coredump in Perl_re_op_compile
Message ID:
CANgJU+Vb-0hDdASYyyfruCk9mfHR1V-4-PTvngOA_ojG1hRyBg@mail.gmail.com
On 27 January 2017 at 17:00, demerphq <demerphq@gmail.com> wrote:
> On 27 January 2017 at 16:15, Hugo van der Sanden via RT
> <perlbug-followup@perl.org> wrote:
>> On Fri, 27 Jan 2017 01:26:03 -0800, demerphq wrote:
>>> Instead of converting the impossible construct into an OPFAIL, we can
>>> inject an OPFAIL in *front* of the impossible construct.
>>
>> Cool, I like.
>>
>>> This patch would have been easier if S_reginsert() documented that it is
>>> the callers responsibility to properly set up the NEXT_OFF() of the inserted
>>> node (if the node has a NEXT_OFF())
>>
>> Should it be setting that only if PASS2? I didn't think we were supposed to write into the node during sizing.
>
> Good catch. Fix is testing and will be pushed shortly.

Pushed as

commit 2253e8fbc23277e000d9e0dc692359f58ba6b0f6
Author: Yves Orton <demerphq@gmail.com>
Date:   Fri Jan 27 16:57:40 2017 +0100

    only mess with NEXT_OFF() when we are in PASS2

    In 31fc93954d1f379c7a49889d91436ce99818e1f6 I added code that would modify
    NEXT_OFF() when we were not in PASS2, when we should not do so.
Strangly this
    did not segfault when I tested, but this fix is required.

Thanks Hugo!

cheers,
Yves

Thread Previous


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