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

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

Thread Previous | Thread Next
Father Chrysostomos via RT
February 2, 2012 18:07
[perl #105906] Bleadperl d164302a breaks Lexical::Var under threads+mad
Message ID:
On Thu Feb 02 10:51:50 2012, 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

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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About