Following the head refactoring, the Newz doesn't clear the SvPVX
Nicholas Clark [Wed, 1 Jun 2005 09:19:46 +0000 (09:19 +0000)]
So PL_mess_sv contained an uninitialised value.

p4raw-id: //depot/perl@24657

util.c

diff --git a/util.c b/util.c
index f80eb63..8b683a7 100644 (file)
--- a/util.c
+++ b/util.c
@@ -875,6 +875,7 @@ S_mess_alloc(pTHX)
     Newz(905, any, 1, XPVMG);
     SvFLAGS(sv) = SVt_PVMG;
     SvANY(sv) = (void*)any;
+    SvPV_set(sv, 0);
     SvREFCNT(sv) = 1 << 30; /* practically infinite */
     PL_mess_sv = sv;
     return sv;