This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
As 2/3rds (or 3/4s) of the SV head structure is rewritten, it doesn't
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index 57ca682..371d17e 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -283,7 +283,6 @@ Perl_sv_add_arena(pTHX_ char *ptr, U32 size, U32 flags)
     SV* sva = (SV*)ptr;
     register SV* sv;
     register SV* svend;
-    Zero(ptr, size, char);
 
     /* The first SV in an arena isn't an SV. */
     SvANY(sva) = (void *) PL_sv_arenaroot;             /* ptr to next arena */
@@ -297,6 +296,7 @@ Perl_sv_add_arena(pTHX_ char *ptr, U32 size, U32 flags)
     sv = sva + 1;
     while (sv < svend) {
        SvANY(sv) = (void *)(SV*)(sv + 1);
+       SvREFCNT(sv) = 0;
        SvFLAGS(sv) = SVTYPEMASK;
        sv++;
     }