This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
op.c: Skip priv flags assert if ppaddr changes
authorFather Chrysostomos <sprout@cpan.org>
Mon, 13 Oct 2014 19:35:49 +0000 (12:35 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 13 Oct 2014 21:48:31 +0000 (14:48 -0700)
because an XS module is probably installing its own ppaddr, in which
case it knows more about the private flags than we do.

op.c

diff --git a/op.c b/op.c
index 6b87a55..268f2ee 100644 (file)
--- a/op.c
+++ b/op.c
@@ -695,7 +695,9 @@ Perl_op_free(pTHX_ OP *o)
 
     /* an op should only ever acquire op_private flags that we know about.
      * If this fails, you may need to fix something in regen/op_private */
-    assert(!(o->op_private & ~PL_op_private_valid[type]));
+    if (o->op_ppaddr == PL_ppaddr[o->op_type]) {
+       assert(!(o->op_private & ~PL_op_private_valid[type]));
+    }
 
     if (o->op_private & OPpREFCOUNTED) {
        switch (type) {