Change 23320 by davem@no-spam on 2004/09/12 22:09:51
[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/perl/sv.c#762 edit
Differences ...
==== //depot/perl/sv.c#762 (text) ====
Index: perl/sv.c
--- perl/sv.c#761~23277~ Wed Sep 8 09:49:59 2004
+++ perl/sv.c Sun Sep 12 15:09:51 2004
@@no-spam -1756,6 +1756,7 @@no-spam
bool
Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
{
+
char* pv = NULL;
U32 cur = 0;
U32 len = 0;
@@no-spam -1953,7 +1954,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.