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

Re: [perl #57244] perlbug AutoReply: crash with recursive regexp

From:
Zefram
Date:
July 24, 2008 09:38
Subject:
Re: [perl #57244] perlbug AutoReply: crash with recursive regexp
Message ID:
20080724163830.GM10967@fysh.org
More information:

My cow-orker Ilmari did some analysis on which part of the perl code
is involved.  He mailed the results to RT, but the message hasn't shown
up there.  In brief: the memory allocations are for the start/end indices
of captured submatches, and the writes that exceed the allocations are
trying to clear the indices to -1.

There's a pair of capturing parens in one of the regexps in the test
program.  If they are removed then valgrind reports no errors.  In the
real application, removing the corresponding parens (which are actually
not meant to be there) avoids all crashes.

-zefram



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About