FAQ
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a24da70b9c071e0d13c52a50085b8790d36b5ba8?hp=88203927dfd53d8b5cfca0639c2ed67e4bbe39d2>

- Log -----------------------------------------------------------------
commit a24da70b9c071e0d13c52a50085b8790d36b5ba8
Author: Nicholas Clark <nick@ccl4.org>
Date: Tue Mar 17 17:19:23 2015 +0100

     PL_custom_op{s,_names,_descs} should be set to NULL in perl_destruct().

     Otherwise SEGVs and other jollity can happen if the interpreter is created a
     second (or subsequent) time, and modules attempt to register custom OPs
     (using either the old or new approaches).

     These appear to have been bugs since the relevant code was introduced
     (new approach in v5.14.0, old approach in v5.8.0)

     This probably only affects mod_perl built against a perl without ithreads,
     which makes it unlikely that many folks hit it with OS distributions.

     You'd need to (at least) be building your own perl, using mod_perl, and
     using a module that uses custom OPs.
-----------------------------------------------------------------------

Summary of changes:
  perl.c | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/perl.c b/perl.c
index 76ba1b4..afa2107 100644
--- a/perl.c
+++ b/perl.c
@@ -1313,6 +1313,13 @@ perl_destruct(pTHXx)
      Perl_reentrant_free(aTHX);
  #endif

+ /* These all point to HVs that are about to be blown away.
+ Code in core and on CPAN assumes that if the interpreter is re-started
+ that they will be cleanly NULL or pointing to a valid HV. */
+ PL_custom_op_names = NULL;
+ PL_custom_op_descs = NULL;
+ PL_custom_ops = NULL;
+
      sv_free_arenas();

      while (PL_regmatch_slab) {

--
Perl5 Master Repository

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupperl5-changes @
categoriesperl
postedMar 17, '15 at 4:37p
activeMar 17, '15 at 4:37p
posts1
users1
websiteperl.org

1 user in discussion

Nicholas Clark: 1 post

People

Translate

site design / logo © 2017 Grokbase