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
Aaron Crane
July 13, 2014 23:34
Re: [perl #122283] Possible regexp memory explosion in 5.20.0
Message ID:
Damian Conway via RT <> 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

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

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 **

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About