Optimizing hash keys into shared strings doesn't work with ithreads.
Spider Boardman [Fri, 8 Sep 2000 01:30:27 +0000 (21:30 -0400)]
Subject: Re: [ID 20000907.008] Not OK: v5.7.0 on alpha-dec_osf-thread-multi
Message-Id: <200009080530.BAA10498@leggy.zk3.dec.com>

p4raw-id: //depot/perl@7037

op.c

diff --git a/op.c b/op.c
index 1203802..c31bf15 100644 (file)
--- a/op.c
+++ b/op.c
@@ -495,7 +495,8 @@ Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype)
                   (sv = names[PL_padix]) && sv != &PL_sv_undef)
                continue;
            sv = *av_fetch(PL_comppad, PL_padix, TRUE);
-           if (!(SvFLAGS(sv) & (SVs_PADTMP|SVs_PADMY)) && !IS_PADGV(sv))
+           if (!(SvFLAGS(sv) & (SVs_PADTMP|SVs_PADMY)) &&
+               !IS_PADGV(sv) && !IS_PADCONST(sv))
                break;
        }
        retval = PL_padix;
@@ -6673,7 +6674,7 @@ Perl_peep(pTHX_ register OP *o)
 
            /* Make the CONST have a shared SV */
            svp = cSVOPx_svp(((BINOP*)o)->op_last);
-           if (!SvFAKE(sv = *svp) || !SvREADONLY(sv)) {
+           if ((!SvFAKE(sv = *svp) || !SvREADONLY(sv)) && !IS_PADCONST(sv)) {
                key = SvPV(sv, keylen);
                lexname = newSVpvn_share(key, keylen, 0);
                SvREFCNT_dec(sv);