develooper Front page | perl.perl5.porters | Postings from May 2013

Re: [perl #118139] Storable in DESTROY blocks

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
May 28, 2013 21:15
Subject:
Re: [perl #118139] Storable in DESTROY blocks
Message ID:
20130528211519.GQ3729@plum.flirble.org
On Tue, May 28, 2013 at 05:28:06PM +0100, Nicholas Clark wrote:
> On Tue, May 28, 2013 at 06:23:26PM +0200, Leon Timmermans wrote:
> > On Tue, May 28, 2013 at 6:17 PM, Nicholas Clark <nick@ccl4.org> wrote:
> > > I'm not sure how much sanity it will cost to refactor this.
> > 
> > One fix that doesn't require too much refactoring may be to move it
> > from a DESTROY method to free magic. Those are run much later.
> 
> Yes, that feels like a good start. I wonder if doing that is enough to
> make Storable reliable during global destruction. The cause of the bug seems
> to be solely that the thing that its context points to is getting wiped
> during object destruction, rather than after it.

I think it just might be. It's done on smoke-me/nicholas/Storable
with Reini's test case added. Test case fails without the change, passes
with it. A superficial test with valgrind suggests that nothing is leaking.

I've only pushed this to see what breaks. There's still the ChangeLog to
update and I'm not sure what else.

Nicholas Clark

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