develooper Front page | perl.perl5.porters | Postings from March 2001

Re: my purify runs with 5.6.1-to-be

Thread Previous | Thread Next
From:
Alan Burlison
Date:
March 15, 2001 16:29
Subject:
Re: my purify runs with 5.6.1-to-be
Message ID:
3AB15EAD.CED9D8E5@uk.sun.com
Gurusamy Sarathy wrote:

> P.S: Note that these tests are all done without changing how the
> global destruction happens.  Alan is doing more testing with his
> fully refcount-based destruction, which I expect might turn up cases
> hidden by the arena cleanup.

Indeed it does - It shows up the heap corruption caused by the

reset;
if (0) {
  if ("" =~ //) {
  }
}

testcase.  I've attached the purify errors below.  Basically this bug is
unchanged since the last discussion of it on the list a couple of weeks
back.

FMR: Free memory read:
  * This is occurring while in:
        Perl_sv_reset  [sv.c:5076]
        Perl_pp_reset  [pp_ctl.c:1631]
        Perl_runops_debug [run.c:53]
        S_run_body     [perl.c:1476]
        perl_run       [perl.c:1398]
        main           [perlmain.c:52]
        _start         [crt1.o]
  * Reading 1 byte from 0xc6a3c in the heap.
  * Address 0xc6a3c is 52 bytes into a freed  block at 0xc6a08 of 56
bytes.
  * This block was allocated from:
        malloc         [rtlib.o]
        Perl_safesysmalloc [util.c:85]
        Perl_newPMOP   [op.c:2892]
        S_scan_pat     [toke.c:6161]
        Perl_yylex     [toke.c:3594]
        Perl_yyparse   [perly.c:1432]
        S_parse_body   [perl.c:1322]
        perl_parse     [perl.c:900]
        main           [perlmain.c:50]
        _start         [crt1.o]
  * There have been 23 frees since this block was freed from:
        free           [rtlib.o]
        Perl_safesysfree [util.c:158]
        Perl_op_free   [op.c:757]
        Perl_op_free   [op.c:738]
        Perl_op_free   [op.c:738]
        Perl_op_free   [op.c:738]
        S_new_logop    [op.c:3656]
        Perl_newLOGOP  [op.c:3617]
        Perl_newCONDOP [op.c:3739]
        Perl_yyparse   [perly.y:212]
        S_parse_body   [perl.c:1322]
        perl_parse     [perl.c:900]
        main           [perlmain.c:50]
        _start         [crt1.o]

****  Purify instrumented /home/alanbur/perlforce/pureperl/pureperl (pid
22149)  ****
FMW: Free memory write:
  * This is occurring while in:
        Perl_sv_reset  [sv.c:5076]
        Perl_pp_reset  [pp_ctl.c:1631]
        Perl_runops_debug [run.c:53]
        S_run_body     [perl.c:1476]
        perl_run       [perl.c:1398]
        main           [perlmain.c:52]
        _start         [crt1.o]
  * Writing 1 byte to 0xc6a3c in the heap.
  * Address 0xc6a3c is 52 bytes into a freed  block at 0xc6a08 of 56
bytes.
  * This block was allocated from:
        malloc         [rtlib.o]
        Perl_safesysmalloc [util.c:85]
        Perl_newPMOP   [op.c:2892]
        S_scan_pat     [toke.c:6161]
        Perl_yylex     [toke.c:3594]
        Perl_yyparse   [perly.c:1432]
        S_parse_body   [perl.c:1322]
        perl_parse     [perl.c:900]
        main           [perlmain.c:50]
        _start         [crt1.o]
  * There have been 23 frees since this block was freed from:
        free           [rtlib.o]
        Perl_safesysfree [util.c:158]
        Perl_op_free   [op.c:757]
        Perl_op_free   [op.c:738]
        Perl_op_free   [op.c:738]
        Perl_op_free   [op.c:738]
        S_new_logop    [op.c:3656]
        Perl_newLOGOP  [op.c:3617]
        Perl_newCONDOP [op.c:3739]
        Perl_yyparse   [perly.y:212]
        S_parse_body   [perl.c:1322]
        perl_parse     [perl.c:900]
        main           [perlmain.c:50]
        _start         [crt1.o]

****  Purify instrumented /home/alanbur/perlforce/pureperl/pureperl (pid
22149)  ****
FMR: Free memory read:
  * This is occurring while in:
        Perl_sv_reset  [sv.c:5075]
        Perl_pp_reset  [pp_ctl.c:1631]
        Perl_runops_debug [run.c:53]
        S_run_body     [perl.c:1476]
        perl_run       [perl.c:1398]
        main           [perlmain.c:52]
        _start         [crt1.o]
  * Reading 4 bytes from 0xc6a30 in the heap.
  * Address 0xc6a30 is 40 bytes into a freed  block at 0xc6a08 of 56
bytes.
  * This block was allocated from:
        malloc         [rtlib.o]
        Perl_safesysmalloc [util.c:85]
        Perl_newPMOP   [op.c:2892]
        S_scan_pat     [toke.c:6161]
        Perl_yylex     [toke.c:3594]
        Perl_yyparse   [perly.c:1432]
        S_parse_body   [perl.c:1322]
        perl_parse     [perl.c:900]
        main           [perlmain.c:50]
        _start         [crt1.o]
  * There have been 23 frees since this block was freed from:
        free           [rtlib.o]
        Perl_safesysfree [util.c:158]
        Perl_op_free   [op.c:757]
        Perl_op_free   [op.c:738]
        Perl_op_free   [op.c:738]
        Perl_op_free   [op.c:738]
        S_new_logop    [op.c:3656]
        Perl_newLOGOP  [op.c:3617]
        Perl_newCONDOP [op.c:3739]
        Perl_yyparse   [perly.y:212]
        S_parse_body   [perl.c:1322]
        perl_parse     [perl.c:900]
        main           [perlmain.c:50]
        _start         [crt1.o]

However, the *really* good news is that you seem to have fixed the anon
sub leak - thank you very, very much!

Alan Burlison

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About