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

Re: [perl #118139] Storable in DESTROY blocks

Thread Previous | Thread Next
Steffen Mueller
May 23, 2013 15:45
Re: [perl #118139] Storable in DESTROY blocks
Message ID:
On 05/23/2013 05:30 PM, (via RT) wrote:
> # New Ticket Created by
> # Please include the string:  [perl #118139]
> # in the subject line of all future correspondence about this issue.
> # <URL: >
> This is a bug report for perl from,
> generated with the help of perlbug 1.39 running under perl 5.18.0.
> -----------------------------------------------------------------
> Storable segfaults when being used in DESTROY blocks during global
> destruction, when accessing an already freed PL_modglobal or the internal
> ctx.
> The best fix is to die if used in global destruction.
> See the new test t/destroy.t, which crashes in all perl versions.
> Since this Storable fix needs to be released on CPAN also, I had to
> add some compatibility fixes, tested back to 5.6.

There's a more general problem with this: occasionally, C extensions 
need to do cleanup very late during global destruction. Usually just a 
free() or Safefree() to be done after all Perl code is done. Maybe 
adding a C level hook for this could allow Storable to work around this 
problem as well? Given what you write, I think maybe not that easily.


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