This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
op_free(): don't assert op_private ok when erred
authorDavid Mitchell <davem@iabyn.com>
Thu, 19 Nov 2015 15:49:03 +0000 (15:49 +0000)
committerDavid Mitchell <davem@iabyn.com>
Thu, 19 Nov 2015 16:00:31 +0000 (16:00 +0000)
commit09681a13f07600082e5a7efbc9c978f62b24c502
treedd615371701ba27ca337a5c6fb8e7690490fc00d
parent702e1efd849c4e184950c524f107ecd2e7d19a77
op_free(): don't assert op_private ok when erred

[perl #126258]

op_free includes an assert to make sure each op's op_private field
only has the flags set that are expected for that op. It's a thing I added
at the same time I added the regen/op_private mechanism, and is more a
general "make sure people are only setting the flags we know about" test.

However, if the op tree is being freed after a compilation error, some
op's flags may be in an inconsistent state; so skip the assert in that case.

e.g.

    perl -e 'grep$0,0}'
op.c