diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-07-08 20:26:20 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-07-08 20:26:20 +0000 |
commit | 463d09e6aae174eaf79dbe628f27cb752bc2f77b (patch) | |
tree | 845a46b23a6a2a5162cbeff1fa43dd0dcdb7186a /op.c | |
parent | be17bf04ae90bd9018133c867f86b22ba0016128 (diff) | |
download | perl-463d09e6aae174eaf79dbe628f27cb752bc2f77b.tar.gz |
The CHECKOP macro was not invoked on some newly created ops
(to match them against the current opmask.) As a consequence,
Safe compartments were unable to trap some ops (pattern
match, slices, conditionals.) This fixes the holes.
p4raw-id: //depot/perl@20079
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2174,7 +2174,7 @@ Perl_newLISTOP(pTHX_ I32 type, I32 flags, OP *first, OP *last) listop->op_last = pushop; } - return (OP*)listop; + return CHECKOP(type, listop); } OP * @@ -2611,7 +2611,7 @@ Perl_newPMOP(pTHX_ I32 type, I32 flags) PmopSTASH_set(pmop,PL_curstash); } - return (OP*)pmop; + return CHECKOP(type, pmop); } OP * @@ -3417,6 +3417,8 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp) first->op_next = (OP*)logop; first->op_sibling = other; + CHECKOP(type,logop); + o = newUNOP(OP_NULL, 0, (OP*)logop); other->op_next = o; @@ -3461,6 +3463,8 @@ Perl_newCONDOP(pTHX_ I32 flags, OP *first, OP *trueop, OP *falseop) logop->op_other = LINKLIST(trueop); logop->op_next = LINKLIST(falseop); + CHECKOP(OP_COND_EXPR, /* that's logop->op_type */ + logop); /* establish postfix order */ start = LINKLIST(first); |