From: Gurusamy Sarathy Date: Thu, 6 Jan 2000 02:55:30 +0000 (+0000) Subject: USE_ITHREADS tweak (reused pad values could be SvREADONLY if X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2aa1bedce372e6b76c98a4d8a94a86dbb450f3a0;p=p5sagit%2Fp5-mst-13.2.git USE_ITHREADS tweak (reused pad values could be SvREADONLY if they belonged to freed OP_CONSTs) p4raw-id: //depot/perl@4761 --- diff --git a/op.c b/op.c index 0351b0e..383e917 100644 --- a/op.c +++ b/op.c @@ -512,8 +512,12 @@ Perl_pad_free(pTHX_ PADOFFSET po) DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad 0x%"UVxf" free %"IVdf"\n", PTR2UV(PL_curpad), (IV)po)); #endif /* USE_THREADS */ - if (PL_curpad[po] && PL_curpad[po] != &PL_sv_undef) + if (PL_curpad[po] && PL_curpad[po] != &PL_sv_undef) { SvPADTMP_off(PL_curpad[po]); +#ifdef USE_ITHREADS + SvREADONLY_off(PL_curpad[po]); /* could be a freed constant */ +#endif + } if ((I32)po < PL_padix) PL_padix = po - 1; }