From 0e705b3b353ba0c64bcdebfc3060f9145472578b Mon Sep 17 00:00:00 2001 From: Dave Mitchell Date: Sun, 11 Apr 2004 14:27:26 +0000 Subject: [PATCH] Stop PL_comppad pointing to a freed pad during global destruction p4raw-id: //depot/perl@22688 --- sv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sv.c b/sv.c index b776f56..36fbc21 100644 --- a/sv.c +++ b/sv.c @@ -448,6 +448,10 @@ do_clean_all(pTHX_ SV *sv) { DEBUG_D((PerlIO_printf(Perl_debug_log, "Cleaning loops: SV at 0x%"UVxf"\n", PTR2UV(sv)) )); SvFLAGS(sv) |= SVf_BREAK; + if (PL_comppad == (AV*)sv) { + PL_comppad = Nullav; + PL_curpad = Null(SV**); + } SvREFCNT_dec(sv); } -- 2.7.4