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

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

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
December 12, 2010 13:09
Subject:
[perl #39246] Core dump in Storable::store
Message ID:
rt-3.6.HEAD-17624-1292188165-1573.39246-15-0@perl.org
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?





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