develooper Front page | perl.perl5.porters | Postings from July 2014

Re: [perl #122283] Possible regexp memory explosion in 5.20.0

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
July 14, 2014 20:12
Subject:
Re: [perl #122283] Possible regexp memory explosion in 5.20.0
Message ID:
20140714201236.GT15971@iabyn.com
On Mon, Jul 14, 2014 at 12:15:46PM -0600, Karl Williamson wrote:
> On 07/14/2014 04:13 AM, Dave Mitchell wrote:
> >It bisects to the following
> 
> I'm curious as to how you bisected this.  When I tried running Aaron's
> script on my machine, it quickly ate up all the memory available.  What I
> was planning to do to bisect it was to add a call to setrlimit() to
> perlmain.c to cause it to die when it used up a much smaller amount of
> memory, long before my machine starts thrashing.  But perhaps you have a
> better way that would be educational for me and others to hear about.

I just started a new shell and did

    $ ulimit -v 500000

then ran the bisect.

(I had to experiment for a minute or so to find a suitable limit that
ran ok on 5.18.0 and died quickly on 5.2.0.)

-- 
My get-up-and-go just got up and went.

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