Skip Menu |

This queue is for tickets about the Scope-Upper CPAN distribution.

Report information
The Basics
Id: 100264
Status: resolved
Priority: 0/
Queue: Scope-Upper

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 0.26



Subject: [PATCH] Don’t use CvPADLIST on XSUBs
That field has been repurposed for XSUBs in bleadperl. Scope::Upper now has assertion failures under debugging builds. See the attachment.
Subject: open_zt8iU2WU.txt
diff -rup Scope-Upper-0.25-PTRJcS-orig/Upper.xs Scope-Upper-0.25-PTRJcS/Upper.xs --- Scope-Upper-0.25-PTRJcS-orig/Upper.xs 2014-09-20 09:06:30.000000000 -0700 +++ Scope-Upper-0.25-PTRJcS/Upper.xs 2014-11-10 22:19:40.000000000 -0800 @@ -1533,8 +1533,10 @@ STATIC void su_uplevel_restore(pTHX_ voi * depth to be 0, or perl would complain about it being "still in use". * But we *know* that it cannot be so. */ if (sud->renamed) { - CvDEPTH(sud->renamed) = 0; - CvPADLIST(sud->renamed) = NULL; + if (!CvISXSUB(sud->renamed)) { + CvDEPTH(sud->renamed) = 0; + CvPADLIST(sud->renamed) = NULL; + } SvREFCNT_dec(sud->renamed); } @@ -1688,13 +1690,13 @@ STATIC CV *su_cv_clone(pTHX_ CV *proto, CvROOT(cv) = OpREFCNT_inc(CvROOT(proto)); OP_REFCNT_UNLOCK; CvSTART(cv) = CvSTART(proto); + CvPADLIST(cv) = CvPADLIST(proto); } CvOUTSIDE(cv) = CvOUTSIDE(proto); #ifdef CVf_WEAKOUTSIDE if (!(CvFLAGS(proto) & CVf_WEAKOUTSIDE)) #endif SvREFCNT_inc_simple_void(CvOUTSIDE(cv)); - CvPADLIST(cv) = CvPADLIST(proto); #ifdef CvOUTSIDE_SEQ CvOUTSIDE_SEQ(cv) = CvOUTSIDE_SEQ(proto); #endif
Thanks for the patch. It has been published in version 0.26. Vincent