develooper Front page | perl.perl5.porters | Postings from July 2018

Re: [perl #129880] regcomp.c:6207: SV *S_concat_pat(RExC_state_t*const, SV *, SV **const, int, OP *, _Bool *, SV *): Assertion`oplist->op_type == OP_PADAV || oplist->op_type == OP_RV2AV' failed

Thread Previous | Thread Next
From:
Brian C.
Date:
July 13, 2018 22:12
Subject:
Re: [perl #129880] regcomp.c:6207: SV *S_concat_pat(RExC_state_t*const, SV *, SV **const, int, OP *, _Bool *, SV *): Assertion`oplist->op_type == OP_PADAV || oplist->op_type == OP_RV2AV' failed
Message ID:
31142_1531519953_5B4923D1_31142_299_1_CANMVOuyjGTXKfi4Qd3Cca3Teb9-X=+0cvH+zG3uq8mPJZ_50WA@mail.gmail.com
perl -e 'qr/(?{})@0{@0}@0/' also triggers this assertion failure in version
5.29.0-87-ga13f1de.

perl: regcomp.c:6404: SV *S_concat_pat(RExC_state_t *const, SV *, SV
**const, int, OP *, _Bool *, SV *): Assertion `oplist->op_type == OP_PADAV
|| oplist->op_type == OP_RV2AV' failed.

On Sun, Oct 16, 2016 at 9:09 AM, Hugo van der Sanden via RT <
perlbug-followup@perl.org> wrote:

> On Fri Oct 14 14:42:19 2016, brian.carpenter@gmail.com wrote:
> > Triggered in Perl v5.25.6 (v5.25.5-104-gaff2be5).
> >
> > perl -e 'qr{(?{}){@0{@}}@0}'
> >
> > perl: regcomp.c:6207: SV *S_concat_pat(RExC_state_t *const, SV *, SV
> > **const, int, OP *, _Bool *, SV *): Assertion `oplist->op_type ==
> OP_PADAV
> > || oplist->op_type == OP_RV2AV' failed.
> > Aborted
>
> It appears to be sufficient to expand the assert as below; however I don't
> know if there's a bug elsewhere that's causing the OP_HSLICE to leak to us
> in this case - a valid case (such as qr{(?{}){@x{@y}}@y}) has the hash
> slice expanded before it reaches concat_pat().
>
> I'm guessing Dave would know.
>
> Hugo
> --- a/regcomp.c
> +++ b/regcomp.c
> @@ -6204,7 +6204,8 @@ S_concat_pat(pTHX_ RExC_state_t * const pRExC_state,
>
>              if (oplist) {
>                  assert(oplist->op_type == OP_PADAV
> -                    || oplist->op_type == OP_RV2AV);
> +                    || oplist->op_type == OP_RV2AV
> +                    || oplist->op_type == OP_HSLICE);
>                  oplist = OpSIBLING(oplist);
>              }
>
>
>
> ---
> via perlbug:  queue: perl5 status: new
> https://rt.perl.org/Ticket/Display.html?id=129880
>

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