perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/lib/Apache compat.pm
Date Sat, 20 Dec 2003 01:28:43 GMT
stas        2003/12/19 17:28:43

  Modified:    lib/Apache compat.pm
  Log:
  a buggy threaded perl gets upset when deleting a hash entry (after perl_clone
  and CLONE) and assigning to something else. doing it in two steps keeps it happy.
  
  Revision  Changes    Path
  1.94      +6 -1      modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.93
  retrieving revision 1.94
  diff -u -u -r1.93 -r1.94
  --- compat.pm	19 Dec 2003 02:40:42 -0000	1.93
  +++ compat.pm	20 Dec 2003 01:28:43 -0000	1.94
  @@ -182,7 +182,12 @@
                   "as it has not been overridden";
               next;
           }
  -        my $original_sub = delete $overridden_mp2_api{$sub};
  +        # XXX: 5.8.2+ can't delete and assign at once - gives:
  +        #    Attempt to free unreferenced scalar
  +        # after perl_clone. the 2 step works ok. to reproduce:
  +        # t/TEST -maxclients 1 perl/ithreads2.t compat/request.t
  +        my $original_sub = $overridden_mp2_api{$sub};
  +        delete $overridden_mp2_api{$sub};
           no warnings 'redefine';
           no strict 'refs';
           *$sub = $original_sub;
  
  
  

Mime
View raw message