Does anyone know what's causing the Apache::Request object to
leak here?  See # XXX comment below:

<Perl>
     package Apache::test;

     sub Apache::Request::DESTROY{warn "DEAD: $_[0]\n"}
     sub Apache::DESTROY{warn "Dead: $_[0]\n"}

     use Devel::Peek;
     use Apache::Request;

     sub handler {
         my $r = shift;
         my $apr = Apache::Request->new($r);

         Dump($apr); # OK
         $r = $apr;  # XXX: what's going on here???
         Dump($apr); # fscked

         $r->send_http_header;
         $r->print('apr test');
         return 200;
     }
     1;
</Perl>

<Location /test>
   SetHandler perl-script
   PerlHandler Apache::test
</Location>


----------> server error log for request to /test <--------------

[Wed Jul 10 07:38:32 2002] [notice] Apache/1.3.27-dev (Unix) 
mod_perl/1.27_01-dev Perl/v5.8.0 configured

[...]

SV = RV(0x87aca6c) at 0x89902b8
   REFCNT = 1
   FLAGS = (PADBUSY,PADMY,ROK)
   RV = 0x8626da4
   SV = PVMG(0x8703130) at 0x8626da4
     REFCNT = 1
     FLAGS = (OBJECT,RMG,IOK,pIOK)
     IV = 148456972
     NV = 0
     PV = 0
     MAGIC = 0x8d7b2c8
       MG_VIRTUAL = 0
       MG_TYPE = PERL_MAGIC_ext(~)
       MG_FLAGS = 0x02
         REFCOUNTED
       MG_OBJ = 0x89975dc
       SV = RV(0x87aca64) at 0x89975dc
         REFCNT = 2
         FLAGS = (PADBUSY,PADMY,ROK)
         RV = 0x8626c78
         SV = PVMG(0x8703110) at 0x8626c78
           REFCNT = 2
           FLAGS = (OBJECT,IOK,pIOK)
           IV = 148451868
           NV = 0
           PV = 0
           STASH = 0x8298510     "Apache"
       MG_LEN = -1
       MG_PTR = 0x8d9321c ???? - please notify IZ
     STASH = 0x835f8ec   "Apache::Request"
SV = RV(0x87aca6c) at 0x89902b8
   REFCNT = 1
   FLAGS = (PADBUSY,PADMY,ROK)
   RV = 0x8626da4
   SV = PVMG(0x8703130) at 0x8626da4
     REFCNT = 2
     FLAGS = (OBJECT,RMG,IOK,pIOK)
     IV = 148456972
     NV = 0
     PV = 0
     MAGIC = 0x8d7b2c8
       MG_VIRTUAL = 0
       MG_TYPE = PERL_MAGIC_ext(~)
       MG_FLAGS = 0x02
         REFCOUNTED
       MG_OBJ = 0x89975dc
       SV = RV(0x87aca64) at 0x89975dc
         REFCNT = 2
         FLAGS = (PADBUSY,PADMY,ROK)
         RV = 0x8626da4
         SV = PVMG(0x8703130) at 0x8626da4
           REFCNT = 2
           FLAGS = (OBJECT,RMG,IOK,pIOK)
           IV = 148456972
           NV = 0
           PV = 0
           MAGIC = 0x8d7b2c8
             MG_VIRTUAL = 0
             MG_TYPE = PERL_MAGIC_ext(~)
             MG_FLAGS = 0x02
               REFCOUNTED
             MG_OBJ = 0x89975dc
             SV = RV(0x87aca64) at 0x89975dc
               REFCNT = 2
               FLAGS = (PADBUSY,PADMY,ROK)
               RV = 0x8626da4
             MG_LEN = -1
             MG_PTR = 0x8d9321c ???? - please notify IZ
           STASH = 0x835f8ec     "Apache::Request"
       MG_LEN = -1
       MG_PTR = 0x8d9321c ???? - please notify IZ
     STASH = 0x835f8ec   "Apache::Request"
Dead: Apache=SCALAR(0x8626c78)

------------------------------------------------------------

Reply via email to