This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Heap decorruption.
authorAlan Burlison <Alan.Burlison@uk.sun.com>
Wed, 30 Aug 2000 22:39:52 +0000 (23:39 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 30 Aug 2000 22:38:18 +0000 (22:38 +0000)
Subject: [PATCH] Fix for miniperl coredump on Solaris with -Duselongdouble
Message-ID: <39AD7F28.A06533CF@uk.sun.com>

p4raw-id: //depot/perl@6929

sv.c

diff --git a/sv.c b/sv.c
index 8778192..5cdcbf9 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -2207,12 +2207,12 @@ Perl_sv_2pv(pTHX_ register SV *sv, STRLEN *lp)
     }
     if (SvNOKp(sv)) {                  /* See note in sv_2uv() */
        /* XXXX 64-bit?  IV may have better precision... */
     }
     if (SvNOKp(sv)) {                  /* See note in sv_2uv() */
        /* XXXX 64-bit?  IV may have better precision... */
-       /* I tried changing this for to be 64-bit-aware and
+       /* I tried changing this to be 64-bit-aware and
         * the t/op/numconvert.t became very, very, angry.
         * --jhi Sep 1999 */
        if (SvTYPE(sv) < SVt_PVNV)
            sv_upgrade(sv, SVt_PVNV);
         * the t/op/numconvert.t became very, very, angry.
         * --jhi Sep 1999 */
        if (SvTYPE(sv) < SVt_PVNV)
            sv_upgrade(sv, SVt_PVNV);
-       SvGROW(sv, 28);
+       SvGROW(sv, NV_DIG + 1);
        s = SvPVX(sv);
        olderrno = errno;       /* some Xenix systems wipe out errno here */
 #ifdef apollo
        s = SvPVX(sv);
        olderrno = errno;       /* some Xenix systems wipe out errno here */
 #ifdef apollo