I have compiled a version of perl5.005
with the pureperl options.

Long story short, I'm now getting a log file out
with some good information.

If I run my individual test:

pureperl -Mblib t/Node::New.t

There are no problems :)  :)

But if I do a make test, I get the following output:
****  Purify instrumented /data/cdmg/dev/pure_perl/bin/pureperl (pid
6431 at Tue Jan 29 07:13:57 2002)
  * Purify 5.1 Solaris 2 (32-bit), Copyright (C) 1992-2000 Rational
Software Corp. All rights reserved. 
  * For contact information type: "purify -help"
  * Command-line: /data/cdmg/dev/pure_perl/bin/pureperl 
  * Options settings: -windows=no -log-file=purify.log
-append-logfile=yes \
    -optimize-save-o7=no -best-effort -purify \
    -purify-home=/apps/rational/purify_5.1 
  * Purify licensed to TEXAS INSTRUMENTS
  * Purify checking enabled.

  * Command-line: /data/cdmg/dev/pure_perl/bin/pureperl \
    -I/data/cdmg/dev/pure_perl/lib/5.005/sun4-solaris \
    -I/data/cdmg/dev/pure_perl/lib/5.005
-MExtUtils::MakeMaker=Version_check \
    -e Version_check('5.4301') 

****  Purify instrumented /data/cdmg/dev/pure_perl/bin/pureperl (pid
6431)  ****
Current file descriptors in use: 7
FIU: file descriptor 0: <stdin>
FIU: file descriptor 1: <stdout>
FIU: file descriptor 2: <stderr>
FIU: file descriptor 4: <inherited from parent>
FIU: file descriptor 5:
"/data/cdmg/dev/pure_perl/lib/5.005/ExtUtils/MakeMaker.pm", O_RDONLY
   * File info: -r--r--r--  1 bpatton  cdmg         58598 Jan 28 19:30
   * File position: 8192
   * This file descriptor was allocated from:
        __open         [libc.so.1]
        _open          [libc.so.1]
        _endopen       [libc.so.1]
        fopen          [libc.so.1]
        Perl_pp_require [pp_ctl.c:2548]
        Perl_runops_standard [run.c:30]
FIU: file descriptor 26: <reserved for Purify internal use>
FIU: file descriptor 27: <reserved for Purify internal use>

****  Purify instrumented /data/cdmg/dev/pure_perl/bin/pureperl (pid
6431)  ****
Purify: Searching for all memory leaks...

Memory leaked: 0 bytes (0%); potentially leaked: 69 bytes (0.0156%)

PLK: 69 bytes potentially leaked in 5 blocks
  * This memory was allocated from:
        malloc         [rtlib.o]
        Perl_safemalloc [util.c:89]
        Perl_sv_grow   [sv.c:1131]
        Perl_newSV     [sv.c:2526]
        Perl_pp_split  [pp.c:4283]
        Perl_runops_standard [run.c:30]


If I'm guessing this correctly, then the first fopen leak comes
from MakeMaker.pm, with a file not being closed.

On the second PLK, I assume it is within the Test::Harness module
man purify, then search for PLK shows this:
    PLK        Potential memory leak                      WARNING

     A PLK message  describes  heap  memory  that  you  may  have
     leaked.   There  are  no pointers to the start of the block,
     but there  exist  pointers  pointing  somewhere  within  the
     block.

     Memory in use may sometimes appear as a PLK if  the  pointer
     returned by malloc() is offset.  A common cause is referenc-
     ing a substring within a  large  string.   Another  example,
     when  a  pointer  to  a  C++ object is cast to the second or
     later base class of  a  multiply  inherited  object,  it  is
     offset past the other base class objects.

     Leaked memory may sometimes appear as a PLK,  if  some  non-
     pointer  integer  within the program space, when interpreted
     as a pointer, points within an  otherwise  leaked  block  of
     memory.  Fortunately, this is rather rare.

     Inspection of the code should usually  easily  differentiate
     between these causes of PLK messages.

Again when I run each on eof my .t files I get no memory leaks.

I have no expectations that this problem could be mine, but a
word from someone who knows would be comforting :)

Reply via email to