In perl.git, the branch maint-5.10 has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/1296576402e633ce66b58a078b18467edf545098?hp=2b78a5d1a51e66164dd2831552a556f718d38d6d>

- Log -----------------------------------------------------------------
commit 1296576402e633ce66b58a078b18467edf545098
Author: Bram <[email protected]>
Date:   Sat Jul 25 16:26:45 2009 +0200

    Do not use a regex in DB::sub
    
    (cherry-picked just the perl5db.pl fix from b7bfa855cd;
    leaving the tests till later)

M       lib/perl5db.pl

commit 161420cb8819b45454027bcfd98b155958a81397
Author: Nicholas Clark <[email protected]>
Date:   Sat Jul 25 17:04:29 2009 +0100

    When resetting our children, wipe out the isa cache too.
    
    (Fix to change 34354, which introduced a cached hash to make ->isa O(1))
    
    (cherry picked from commit 1375cf1cf2085f851bb176047d5e60248542f555)

M       mro.c
-----------------------------------------------------------------------

Summary of changes:
 lib/perl5db.pl |    4 +++-
 mro.c          |    6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 765b0e5..ee1708c 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -3635,6 +3635,8 @@ arguments with which the subroutine was invoked
 =cut
 
 sub sub {
+       # Do not use a regex in this subroutine -> results in corrupted memory
+       # See: [perl #66110]
 
        # lock ourselves under threads
        lock($DBGR);
@@ -3643,7 +3645,7 @@ sub sub {
     # sub's return value in (if needed), and an array to put the sub's
     # return value in (if needed).
     my ( $al, $ret, @ret ) = "";
-       if ($sub =~ /^threads::new$/ && $ENV{PERL5DB_THREADED}) {
+       if ($sub eq 'threads::new' && $ENV{PERL5DB_THREADED}) {
                print "creating new thread\n"; 
        }
 
diff --git a/mro.c b/mro.c
index b095d24..5c049f6 100644
--- a/mro.c
+++ b/mro.c
@@ -437,7 +437,7 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
     if(meta->mro_nextmethod) hv_clear(meta->mro_nextmethod);
 
     /* Iterate the isarev (classes that are our children),
-       wiping out their linearization and method caches */
+       wiping out their linearization, method and isa caches */
     if(isarev) {
         hv_iterinit(isarev);
         while((iter = hv_iternext(isarev))) {
@@ -462,6 +462,10 @@ Perl_mro_isa_changed_in(pTHX_ HV* stash)
                 revmeta->cache_gen++;
             if(revmeta->mro_nextmethod)
                 hv_clear(revmeta->mro_nextmethod);
+           if (revmeta->isa) {
+               SvREFCNT_dec(revmeta->isa);
+               revmeta->isa = NULL;
+           }
         }
     }
 

--
Perl5 Master Repository

Reply via email to