PERL PERL5 CHANGES 42 CHANGE 23335 INTEGRATE
Date: Thu, 23 Sep 2004 10:11:09 -0700

Subject: Change 23335: Integrate:
From: nick@no-spam (Nicholas Clark)

Change 23335 by nicholas@no-spam on 2004/09/23 10:12:34

Integrate:
[ 23320]
[perl #30066] Memory leak in nested shared data structures in 5.8.4
A pop of an item from a shared array ref causes a leak due to AVf_REAL not having been set after an sv_upgrade(sv, SVt_PVAV).
Make sv_upgrade() set always this flag.

Affected files ...

... //depot/maint-5.8/perl/sv.c#111 integrate
Differences ...

==== //depot/maint-5.8/perl/sv.c#111 (text) ====
Index: perl/sv.c --- perl/sv.c#110~23313~ Fri Sep 10 02:56:57 2004
+++ perl/sv.c Thu Sep 23 03:12:34 2004
@@no-spam -1283,6 +1283,7 @@no-spam bool Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
{
+
char* pv = NULL;
U32 cur = 0;
U32 len = 0;
@@no-spam -1472,7 +1473,7 @@no-spam SvSTASH(sv) = stash;
AvALLOC(sv) = 0;
AvARYLEN(sv) = 0;
- AvFLAGS(sv) = 0;
+ AvFLAGS(sv) = AVf_REAL;
break;
case SVt_PVHV:
SvANY(sv) = new_XPVHV();
End of Patch.