summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2002-12-17 10:08:24 +0000
committerhv <hv@crypt.org>2002-12-17 10:08:24 +0000
commit7e736055d1d6da7ec885d3dacef1bcc5e5ef4282 (patch)
tree512e1ccb8bafb07529e153260f2ea8d250eb3bad /pad.c
parent18755edac90087d08b49876214aa686ee7a95263 (diff)
downloadperl-7e736055d1d6da7ec885d3dacef1bcc5e5ef4282.tar.gz
Whoops, these are the changes supposed to be in #18318.
p4raw-id: //depot/perl@18319
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pad.c b/pad.c
index 634b762dac..34efeb09dd 100644
--- a/pad.c
+++ b/pad.c
@@ -1120,13 +1120,15 @@ Perl_pad_free(pTHX_ PADOFFSET po)
if (PL_curpad[po] && PL_curpad[po] != &PL_sv_undef) {
SvPADTMP_off(PL_curpad[po]);
#ifdef USE_ITHREADS
+ /* SV could be a shared hash key (eg bugid #19022) */
+ if (
#ifdef PERL_COPY_ON_WRITE
- if (SvIsCOW(PL_curpad[po])) {
- sv_force_normal_flags(PL_curpad[po], SV_COW_DROP_PV);
- } else
+ !SvIsCOW(PL_curpad[po])
+#else
+ !SvFAKE(PL_curpad[po])
#endif
+ )
SvREADONLY_off(PL_curpad[po]); /* could be a freed constant */
-
#endif
}
if ((I32)po < PL_padix)