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:
Aaron Crane
Date:
July 13, 2014 23:34
Subject:
Re: [perl #122283] Possible regexp memory explosion in 5.20.0
Message ID:
CACmk_tvBJn4SWdso8AXziX-HowH6g=TknuQube8tyZyZxpQzVA@mail.gmail.com
Damian Conway via RT <perlbug-followup@perl.org> wrote:
> I have now had the opportunity to investigate the problem, and have concluded that this has nothing to do with Regexp::Grammars per se, except that R::G is generating the enormous regex that 5.20 is failing to compile.

Yes, it looks that way to me too. Thanks for supplying that reduction.

The file attached cuts down this regex further still, by removing all
the embedded code blocks, and the various DEFINEs whose names begin
"______0_88".

The symptoms I observed seem to be the same, though I also get a
"panic: memory wrap" error (apparently when passing 4 GiB of allocated
memory).

In blead, it looks like the immediate culprit is study_chunk() — it
starts 185 ms after the start of the sizing pass, and I haven't yet
had the patience to let it run long enough to finish.

-- 
Aaron Crane ** http://aaroncrane.co.uk/

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