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

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

Thread Next
Dave Mitchell
June 13, 2010 07:31
Re: [perl.git] branch blead, updated. v5.13.1-179-g2116934
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About