From 2aa1bedce372e6b76c98a4d8a94a86dbb450f3a0 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Thu, 6 Jan 2000 02:55:30 +0000 Subject: [PATCH] USE_ITHREADS tweak (reused pad values could be SvREADONLY if they belonged to freed OP_CONSTs) p4raw-id: //depot/perl@4761 --- op.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.7.4