On Mon Mar 26 16:44:54 2012, sprout wrote: > On Wed Mar 21 20:31:53 2012, tonyc wrote: > > +0.5 as a blocker. > > > > Either fixing the base problem, > > We could accomplish...[this]...with a temporary plaster in > Perl_finalize_optree (tests are still running locally; no failures yet): (When I first sent the message I forgot to delete that parenthetical note, but this time it’s true.) > > diff --git a/op.c b/op.c > index 2ffe10f..9fe4b84 100644 > --- a/op.c > +++ b/op.c > @@ -1496,14 +1496,17 @@ the tree thread-safe. > void > Perl_finalize_optree(pTHX_ OP* o) > { > + I32 i = PL_savestack_ix; > PERL_ARGS_ASSERT_FINALIZE_OPTREE; > > + SAVEFREEOP(o); > ENTER; > SAVEVPTR(PL_curcop); > > finalize_op(o); > > LEAVE; > + PL_savestack_ix = i; > } > > STATIC void > __END__ > > which, although a bit of a hack, looks safe enough. However, it causes > this to crash: > > package Foo; > use fields qw(a b); > sub new { > my $class = shift; > return fields::new($class); > } > my Foo $f = Foo->new; > $f->{c} = 1; > __END__ > > and I haven’t yet figured out why. Because it’s freeing PL_main_root twice. This one appears to work: diff --git a/op.c b/op.c index 2ffe10f..86ec54e 100644 --- a/op.c +++ b/op.c @@ -1496,14 +1496,17 @@ the tree thread-safe. void Perl_finalize_optree(pTHX_ OP* o) { + I32 i = PL_savestack_ix; PERL_ARGS_ASSERT_FINALIZE_OPTREE; + if (o != PL_main_root) SAVEFREEOP(o); ENTER; SAVEVPTR(PL_curcop); finalize_op(o); LEAVE; + PL_savestack_ix = i; } STATIC void __END__ > But, if it can be made to work, does this seem like a good idea? That question is still valid. > > > or reducing the likelihood of the > > warning back to 5.14 levels (somehow.) > > That would involve moving the new strict hints in %^H into $^H, which > could affect CPAN modules that make assumptions about %^H that have > already been updated for 5.16, though that’s unlikely. The unknowns > bother me. And now the unknowns bother me in both proposed fixes. -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=111462Thread Previous | Thread Next