From: Nicholas Clark Date: Sun, 1 Mar 2015 16:07:27 +0000 (+0100) Subject: As of v5.21.6, CvPADLIST() is only legal on pure Perl subroutines. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f36322d12728cd5afc230c25108c4f463220dbe3;p=p5sagit%2FDevel-Size.git As of v5.21.6, CvPADLIST() is only legal on pure Perl subroutines. So move the call to padlist_size into the CvISXSUB() else block. --- diff --git a/CHANGES b/CHANGES index de2fc00..3d20bda 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,11 @@ Revision history for Perl extension Devel::Size. * handle the multideref op, and to a limited extent the UNOP_AUX op class in general. [CPAN #102911] + * As of eacbb37937698a03 (v5.21.6), can't call CvPADLIST on an XSUB. + More usefully, the slot is now used for XS versioning protection, which + means that we can be confident that nothing out there is using it for data. + Reported as [CPAN #102909]. + 0.79_51 2015-02-28 nicholas * as of 5.20.0, s/// is no longer a reliable test for OOK [CPAN #95493] diff --git a/Size.xs b/Size.xs index 840a49d..06d150b 100644 --- a/Size.xs +++ b/Size.xs @@ -921,13 +921,15 @@ sv_size(pTHX_ struct state *const st, const SV * const orig_thing, sv_size(aTHX_ st, (SV *)CvSTASH(thing), SOME_RECURSION); sv_size(aTHX_ st, (SV *)SvSTASH(thing), SOME_RECURSION); sv_size(aTHX_ st, (SV *)CvGV(thing), SOME_RECURSION); - padlist_size(aTHX_ st, CvPADLIST(thing), SOME_RECURSION); sv_size(aTHX_ st, (SV *)CvOUTSIDE(thing), recurse); if (CvISXSUB(thing)) { sv_size(aTHX_ st, cv_const_sv((CV *)thing), recurse); - } else if (CvROOT(thing)) { - op_size(aTHX_ CvSTART(thing), st); - op_size(aTHX_ CvROOT(thing), st); + } else { + padlist_size(aTHX_ st, CvPADLIST(thing), SOME_RECURSION); + if (CvROOT(thing)) { + op_size(aTHX_ CvSTART(thing), st); + op_size(aTHX_ CvROOT(thing), st); + } } goto freescalar;