develooper Front page | perl.perl5.porters | Postings from April 2007

Re: Change 22688: Stop PL_comppad pointing to a freed pad during global destruction

Thread Next
From:
Nicholas Clark
Date:
April 10, 2007 07:01
Subject:
Re: Change 22688: Stop PL_comppad pointing to a freed pad during global destruction
Message ID:
20070410140045.GA70075@plum.flirble.org
On Sun, Apr 11, 2004 at 08:00:00AM -0700, Dave Mitchell wrote:
> Change 22688 by davem@davem-splatty on 2004/04/11 14:27:26
> 
> 	Stop PL_comppad pointing to a freed pad during global destruction
> 
> Affected files ...
> 
> ... //depot/perl/sv.c#735 edit
> 
> Differences ...
> 
> ==== //depot/perl/sv.c#735 (text) ====
> Index: perl/sv.c
> --- perl/sv.c#734~22687~	Sun Apr 11 06:13:35 2004
> +++ perl/sv.c	Sun Apr 11 07:27:26 2004
> @@ -448,6 +448,10 @@
>  {
>      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);
>  }
>  
> End of Patch.

Right. Now I think I understand. Only about 3 years later.

Shouldn't that logic be in sv_clear, in the SVt_PVAV case?

Nicholas Clark

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About