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

[email protected] (Dave Mitchell)
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.