Skip Menu |

This queue is for tickets about the Array-Base CPAN distribution.

Report information
The Basics
Id: 99179
Status: resolved
Priority: 0/
Queue: Array-Base

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Fix assertion failures in perl 5.21.2
Subject: open_4JnwD1TZ.txt
diff -rup Array-Base-0.005-PztWfA-orig/lib/Array/Base.xs Array-Base-0.005-PztWfA/lib/Array/Base.xs --- Array-Base-0.005-PztWfA-orig/lib/Array/Base.xs 2014-09-27 11:17:23.000000000 -0700 +++ Array-Base-0.005-PztWfA/lib/Array/Base.xs 2014-09-27 11:29:40.000000000 -0700 @@ -87,6 +87,7 @@ static OP *myck_aelem(pTHX_ OP *op) IV base; if((base = current_base()) != 0) { OP *aop, *iop; + OP *newsib; if(!(op->op_flags & OPf_KIDS)) { bad_ops: croak("strange op tree prevents applying array base"); @@ -94,11 +95,20 @@ static OP *myck_aelem(pTHX_ OP *op) aop = cBINOPx(op)->op_first; iop = aop->op_sibling; if(!iop || iop->op_sibling) goto bad_ops; +#ifdef op_sibling_splice + op_sibling_splice(op, aop, 0, + op_contextualize( + newBINOP(OP_I_SUBTRACT, 0, + op_sibling_splice(op,aop,1,NULL), + newSVOP(OP_CONST, 0, newSViv(base))), + G_SCALAR)); +#else aop->op_sibling = op_contextualize( newBINOP(OP_I_SUBTRACT, 0, iop, newSVOP(OP_CONST, 0, newSViv(base))), G_SCALAR); +#endif } return nxck_aelem(aTHX_ op); } @@ -116,11 +126,22 @@ static OP *THX_base_myck_slice(pTHX_ OP lop = cLISTOPx(op)->op_first; aop = lop->op_sibling; if(!aop || aop->op_sibling) goto bad_ops; +#ifdef op_sibling_splice + op_sibling_splice(op, NULL, 0, + op_contextualize(mapify_op( + op_sibling_splice( + op, NULL, + 1, NULL), + base, + OP_I_SUBTRACT), + G_ARRAY)); +#else lop->op_sibling = NULL; mop = op_contextualize(mapify_op(lop, base, OP_I_SUBTRACT), G_ARRAY); mop->op_sibling = aop; cLISTOPx(op)->op_first = mop; +#endif } return nxck(aTHX_ op); } @@ -160,6 +181,18 @@ static OP *myck_splice(pTHX_ OP *op) if(!aop) goto bad_ops; iop = aop->op_sibling; if(iop) { +#ifdef op_sibling_splice + op_sibling_splice(op, aop, 0, + newBINOP(OP_I_SUBTRACT, 0, + op_contextualize( + op_sibling_splice( + op, aop, 1, + NULL), + G_SCALAR), + newSVOP(OP_CONST, 0, + newSViv(base))) + ); +#else OP *rest = iop->op_sibling; iop->op_sibling = NULL; iop = newBINOP(OP_I_SUBTRACT, 0, @@ -167,6 +200,7 @@ static OP *myck_splice(pTHX_ OP *op) newSVOP(OP_CONST, 0, newSViv(base))); iop->op_sibling = rest; aop->op_sibling = iop; +#endif } } return nxck_splice(aTHX_ op);
You didn't say what assertion this is about. I'm guessing that it's about op_last. The handling of op_last is fixed in Array-Base-0.006, just uploaded to CPAN.