From: Spider Boardman Date: Fri, 8 Sep 2000 01:30:27 +0000 (-0400) Subject: Optimizing hash keys into shared strings doesn't work with ithreads. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3049cdab56e66ab4bbd72677e85fd044945cc99d;p=p5sagit%2Fp5-mst-13.2.git Optimizing hash keys into shared strings doesn't work with ithreads. 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 --- diff --git a/op.c b/op.c index 1203802..c31bf15 100644 --- 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);