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

Re: [perl #118139] Storable in DESTROY blocks

Thread Previous | Thread Next
From:
Steffen Mueller
Date:
May 23, 2013 15:45
Subject:
Re: [perl #118139] Storable in DESTROY blocks
Message ID:
519E3986.2000005@cpan.org
On 05/23/2013 05:30 PM, rurban@cpanel.net (via RT) wrote:
> # New Ticket Created by  rurban@cpanel.net
> # Please include the string:  [perl #118139]
> # in the subject line of all future correspondence about this issue.
> # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=118139 >
>
>
>
> This is a bug report for perl from rurban@cpanel.net,
> 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.

--Steffen

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