This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e77e2f1
)
[perl #30066] Memory leak in nested shared data structures in 5.8.4
author
Dave Mitchell
<davem@fdisolutions.com>
Sun, 12 Sep 2004 22:09:51 +0000
(22:09 +0000)
committer
Dave Mitchell
<davem@fdisolutions.com>
Sun, 12 Sep 2004 22:09:51 +0000
(22:09 +0000)
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.
p4raw-id: //depot/perl@23320
sv.c
patch
|
blob
|
blame
|
history
diff --git
a/sv.c
b/sv.c
index
20f344f
..
3a443a2
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-1756,6
+1756,7
@@
You generally want to use the C<SvUPGRADE> macro wrapper. See also C<svtype>.
bool
Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
{
+
char* pv = NULL;
U32 cur = 0;
U32 len = 0;
@@
-1953,7
+1954,7
@@
Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt)
SvSTASH(sv) = stash;
AvALLOC(sv) = 0;
AvARYLEN(sv) = 0;
- AvFLAGS(sv) =
0
;
+ AvFLAGS(sv) =
AVf_REAL
;
break;
case SVt_PVHV:
SvANY(sv) = new_XPVHV();