develooper Front page | perl.perl5.porters | Postings from June 2010

Re: [perl.git] branch blead, updated. v5.13.1-179-g2116934

Thread Next
From:
Dave Mitchell
Date:
June 13, 2010 07:31
Subject:
Re: [perl.git] branch blead, updated. v5.13.1-179-g2116934
Message ID:
20100613143123.GP2986@iabyn.com
On Sun, Jun 13, 2010 at 09:52:23AM +0200, Nicholas Clark wrote:
>     In pp_eof, ensure stack space for the second argument to the tied EOF method.
>     

Are you finding these via visual inspection?

This leads to to wonder whether we could automate it?
Something along the lines of, for debugging builds, alter the sp
manipulation macros in pp to initially record the high-water mark of the
stack, increase that mark whenever the  code calls EXTEND etc,
and complain if sp is ever incremented above it; e.g.:


#define dSP       SV **sp = PL_stack_sp; SV** sp_hwm = sp;

#define EXTEND    { ........ ; sp_hwm = sp; }

#define PUSHs(s)  { if (sp >= sp_hwm) croak(...); *++sp = (s)) }



-- 
Indomitable in retreat, invincible in advance, insufferable in victory
    -- Churchill on Montgomery

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