develooper Front page | perl.perl5.porters | Postings from December 2017

[perl #132545] Double macro argument evaluation in S_init_main_stash

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
December 8, 2017 14:36
Subject:
[perl #132545] Double macro argument evaluation in S_init_main_stash
Message ID:
rt-4.0.24-4698-1512743789-691.132545-15-0@perl.org
On Fri, 08 Dec 2017 02:28:38 -0800, arc wrote:
> Thanks very much for your report. I believe this is fixed as of commit
> 9842f1a008ea4490ae903e34ed554be5e0ffc139.

Thank you for the quick fix.  I was guilty of making that mistake, in this commit:

commit 03d9f026ae253e9e69212a3cf6f1944437e9f070
Author: Father Chrysostomos <sprout@cpan.org>
Date:   Sat Oct 22 11:06:35 2011 -0700

    [perl #101486] Make PL_curstash refcounted
    
    This stops PL_curstash from pointing to a freed-and-reused scalar in
    cases like ‘package Foo; BEGIN {*Foo:: = *Bar::}’.
    
    In such cases, another BEGIN block, or any subroutine definition,
    would cause a crash.  Now it just happily proceeds.  newATTRSUB and
    newXS have been modified not to call mro_method_changed_in in such
    cases, as it doesn’t make sense.

This was when I added refcounting to PL_curstash to begin with.  So I wonder whether it is possible to test the fix.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: resolved
https://rt.perl.org/Ticket/Display.html?id=132545

Thread Previous | 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