stas        2002/12/24 17:46:10

  Modified:    src/modules/perl perl_util.c
               .        Changes
  Log:
  prevent segfaults in mod_perl_mark_where() when a sub can't get
  resolved
  Submitted by: Gerald Richter <[EMAIL PROTECTED]>
  Reviewed by:  stas
  
  Revision  Changes    Path
  1.50      +8 -3      modperl/src/modules/perl/perl_util.c
  
  Index: perl_util.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/perl_util.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- perl_util.c       15 May 2002 02:08:16 -0000      1.49
  +++ perl_util.c       25 Dec 2002 01:46:09 -0000      1.50
  @@ -852,11 +852,16 @@
        name = perl_sv_name(sub);
   
       sv_setpv(GvSV(CopFILEGV(curcop)), "");
  -    sv_catpvf(GvSV(CopFILEGV(curcop)), "%s subroutine `%_'", where, name);
  +    if (name) {
  +        sv_catpvf(GvSV(CopFILEGV(curcop)), "%s subroutine `%_'", where, name);
  +        SvREFCNT_dec(name);
  +    }
  +    else {
  +        sv_catpvf(GvSV(CopFILEGV(curcop)), "%s subroutine <unknown>", where);
  +    }
  +    
       CopLINE_set(curcop, 1);
   
  -    if(name)
  -     SvREFCNT_dec(name);
   }
   #endif
   
  
  
  
  1.658     +3 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.657
  retrieving revision 1.658
  diff -u -r1.657 -r1.658
  --- Changes   28 Nov 2002 09:42:45 -0000      1.657
  +++ Changes   25 Dec 2002 01:46:09 -0000      1.658
  @@ -10,6 +10,9 @@
   
   =item 1.27_01-dev
   
  +prevent segfaults in mod_perl_mark_where() when a sub can't get
  +resolved [Gerald Richter <[EMAIL PROTECTED]>]
  +
   Need to load B::Terse/TerseSize if it wasn't loaded yet in that child
   before using it.  [Dan Sully <[EMAIL PROTECTED]>]
   
  
  
  


Reply via email to