develooper Front page | perl.perl5.porters | Postings from September 2010

[perl #19135] string eval turns off readonlyness on lexicals

From:
Father Chrysostomos via RT
Date:
September 26, 2010 12:46
Subject:
[perl #19135] string eval turns off readonlyness on lexicals
Message ID:
rt-3.6.HEAD-5116-1285530409-1226.19135-15-0@perl.org
On Sun Sep 19 12:10:11 2010, sprout wrote:
> The readonliness is turned off explicitly in pad_free under ithreads.
>    See also bug #19022, which resulted from the same change. There is
>    some discussion there, too, but nobody seemed to know exactly why
>    the readonliness needed to be turned off.
> 
> Change 4761/2aa1bed, from January of 2000, added that SvREADONLY_off.
>    It is supposed to make sure that pad entries that were constants
>    will not be constants the next time they are used.
> 
> My question is: When the addresses of those scalars are reused, won’t
>    the scalars be wiped clean? (In case it’s not obvious, I have very
>    little idea how pads actually work.)
> 
> I tried simply deleting that SvREADONLY_off, and all tests pass (see
>    the first attached patch).
> 
> Then I thought that maybe I should check that the SV is freed, and
>    only then do SvREADONLY_off, to preserve the original intent of
>    change 4761/2aa1bed. That worked too.
> 
> So, here are two patches. Take your pick.

Has anyone in the know had a chance to review these yet?




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