develooper Front page | perl.perl5.porters | Postings from December 2017

[perl #39246] Core dump in Storable::store

Thread Previous
From:
Tony Cook via RT
Date:
December 6, 2017 00:06
Subject:
[perl #39246] Core dump in Storable::store
Message ID:
rt-4.0.24-22416-1512518800-26.39246-15-0@perl.org
On Sun, 12 Dec 2010 13:09:26 -0800, sprout wrote:
> On Fri Oct 17 16:21:09 2003, davem wrote:
> > The short answer: doing anything from a DESTROY method during global
> > cleanup is always risky, as you don't know what else has already been
> > cleaned up.
> > 
> > The long answer: Storable has private "context" data structures which
> > it allocates as needed by creating an object SV and typecasting the
> > object's PVX (of the right size) to store this structure.
> > During global cleanup, these object(s) are freed, so you end up with
> > contexts accessible in freed memory. I don't know enough about
> > Storable,
> > and what it uses its contexts for,and why it sees fit to allocate them
> > from PVs, in order to feel confident in trying to fix this.
> 
> If Memoize::Storable were to fire its destructors preemptively in an END
> block, that would eliminate the crash (untested).
> Should Storable itself also be made more resilient?

This may have been fixed by f17010dab44137f3fb45ce35aa343cad9fc8fe0b.

Tony


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

Thread Previous


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