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

Re: [patch] Re: [perl #21728] regexp SEGV

Thread Previous | Thread Next
From:
Enache Adrian
Date:
March 30, 2003 12:16
Subject:
Re: [patch] Re: [perl #21728] regexp SEGV
Message ID:
20030330201705.GA1175@ratsnest.hole
On Sun, Mar 30, 2003 at 08:15:26PM +0100, Dave Mitchell wrote:
> On Fri, Mar 28, 2003 at 11:53:09PM +0200, Enache Adrian wrote:
> > The SSCHECK macro seems to be inappropriately used in regexp.c:174 -
> > afaics from scope.[ch], it is designed to grow the savestack by little
> > bits. ( 5 items ? - see the definitions of SSCHECK(), savestack_grow(),
> > GROW() ).
> > 
> 
> Wouldn't it be better to to just make SSCHECK call savestack_grow_cnt(),
> and have that function grow by the maximum of GROW() and need?

Why changing SSCHECK ? - it's actually called only inside scope.c,
(35 times) and each time with an argument of 2,3 or 4. The idea behind
its trick was probably to make things as fast as possible. Why
mess with that ? Think of the general impact of adding a supplementary
computation inside critical code ( SSPUSH* and friends ) vs.
the bloat of a ~ 50 bytes worth function. 

Regards
Adi

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