This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ckDEAD: PL_curcop->cop_warnings only if PL_curcop
authorDavid Mitchell <davem@iabyn.com>
Mon, 23 Jan 2017 13:27:07 +0000 (13:27 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 23 Jan 2017 13:52:36 +0000 (13:52 +0000)
commitb1a69a65ecd83426da7ca1af26b757fe0da58007
tree17e4aba33dae2be88f35f6bd8e9b12b11f5cc129
parent03fedefe18733baa9ed7c9c22bd816408d57de0d
ckDEAD: PL_curcop->cop_warnings only if PL_curcop

RT #130621

In ckDEAD(), don't check the value of PL_curcop->cop_warnings unless
PL_curcop is non-null.

In the ticket above, the reason that PL_curcop is null is the less
than optimal way that evals free their optree: ideally the optree should
be attached to the eval CV and freed when the CV is; instead a separate
SAVEFREEOP() is done. But that fix is for another time; regardless,
ckDEAD() should have a PL_curcop != NULL guard anyway like isLEXWARN_on()
etc already do.
regen/warnings.pl
warnings.h