Change 29798 by [EMAIL PROTECTED] on 2007/01/13 22:58:25
Integrate:
[ 26494]
Don't try to store PL_sv_undef in pads. (For now)
[ 26518]
A GVs stash can be NULL, so don't call macros that assume otherwise
without checking.
Affected files ...
... //depot/maint-5.8/perl/op.c#152 integrate
... //depot/maint-5.8/perl/pp.c#107 integrate
Differences ...
==== //depot/maint-5.8/perl/op.c#152 (text) ====
Index: perl/op.c
--- perl/op.c#151~29789~ 2007-01-13 10:10:34.000000000 -0800
+++ perl/op.c 2007-01-13 14:58:25.000000000 -0800
@@ -6603,6 +6603,18 @@
SvREADONLY_on(PAD_SVl(ix));
SvREFCNT_dec(cSVOPo->op_sv);
}
+ else if (o->op_type == OP_CONST
+ && cSVOPo->op_sv == &PL_sv_undef) {
+ /* PL_sv_undef is hack - it's unsafe to store it in the
+ AV that is the pad, because av_fetch treats values of
+ PL_sv_undef as a "free" AV entry and will merrily
+ replace them with a new SV, causing pad_alloc to think
+ that this pad slot is free. (When, clearly, it is not)
+ */
+ SvOK_off(PAD_SVl(ix));
+ SvPADTMP_on(PAD_SVl(ix));
+ SvREADONLY_on(PAD_SVl(ix));
+ }
else {
SvREFCNT_dec(PAD_SVl(ix));
SvPADTMP_on(cSVOPo->op_sv);
==== //depot/maint-5.8/perl/pp.c#107 (text) ====
Index: perl/pp.c
--- perl/pp.c#106~29794~ 2007-01-13 11:26:17.000000000 -0800
+++ perl/pp.c 2007-01-13 14:58:25.000000000 -0800
@@ -595,7 +595,8 @@
break;
case 'P':
if (strEQ(second_letter, "ACKAGE")) {
- const char *const name = HvNAME_get(GvSTASH(gv));
+ const HV * const stash = GvSTASH(gv);
+ const char *const name = stash ? HvNAME_get(stash) : NULL;
sv = newSVpv(name ? name : "__ANON__", 0);
}
break;
End of Patch.