develooper Front page | perl.perl5.porters | Postings from February 2012

[perl #105906] Bleadperl d164302a breaks Lexical::Var under threads+mad

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
February 2, 2012 18:07
Subject:
[perl #105906] Bleadperl d164302a breaks Lexical::Var under threads+mad
Message ID:
rt-3.6.HEAD-14510-1328234843-695.105906-15-0@perl.org
On Thu Feb 02 10:51:50 2012, zefram@fysh.org wrote:
> Father Chrysostomos via RT wrote:
> >As of commit d164302a58, the constant gets copied under threads+mad, so
> >the 'no Lexical::Var' doesn't work, as \$foo is no longer returning a
> >reference to the same scalar that Lexical::Var tried to make it return.
> 
> Sounds like it's more fundamentally broken if \$foo doesn't give a
> consistent result.  I'll add that to the test suite.

The test suite is already testing for that, which is why it fails under
threads+mad.

> >Then again, why does it need to be marked PADTMP?  If it's marked
> >PADTMP, it means that taking a reference to it will copy it.  Isn't the
> >readonliness sufficient?
> 
> Readonliness should be sufficient.  I think we can skip the copying in
> that case.

Skip copying it when putting it in the pad (which I agree with), or in
refgen (which would have controversial side-effects)?

I don’t really understand why the copying to the pad was happening to
begin with.  Is it safe to remove that?  If not, we could just have
MADPROPs always copy, which would get things working as well as before
d164302a58 and leave the rest of the issues I brought up till after 5.16
(as I know at least some of the repercussions would be controversial).

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=105906

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