From: Jarkko Hietaniemi Date: Sun, 13 Apr 2003 09:32:05 +0000 (+0000) Subject: Continue hunting for the cause of the Tru64 failed threaded smokes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=91a15d0d1374fd788fdb885af2d209d2668c1f95;p=p5sagit%2Fp5-mst-13.2.git Continue hunting for the cause of the Tru64 failed threaded smokes most probably introduced by the change #19157. The tweak suggested by Stephen McCamant trades a possible dangling pointer (CopFILE() is tricky like that with threads) to a memory leak. (This means that this tweak shouldn't be left in as-is, but if this helps, we at least know that the failure was caused by the #19157.) p4raw-link: @19157 on //depot/perl: 3871c2ef9aa1dfeba4631a17efdbf486012d47a6 p4raw-id: //depot/perl@19197 --- diff --git a/op.c b/op.c index 5ccb73d..1ac2703 100644 --- a/op.c +++ b/op.c @@ -4273,7 +4273,7 @@ Perl_newCONSTSUB(pTHX_ HV *stash, char *name, SV *sv) CopSTASH_set(PL_curcop,stash); } - cv = newXS(name, const_sv_xsub, CopFILE(PL_curcop)); + cv = newXS(name, const_sv_xsub, savepv(CopFILE(PL_curcop))); CvXSUBANY(cv).any_ptr = sv; CvCONST_on(cv); sv_setpv((SV*)cv, ""); /* prototype is "" */