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

[perl #121321] perl 5.19.10 infinite loops on backrefs > number of capture buffers (npar) where npar>9

From:
James E Keenan via RT
Date:
July 4, 2014 01:26
Subject:
[perl #121321] perl 5.19.10 infinite loops on backrefs > number of capture buffers (npar) where npar>9
Message ID:
rt-4.0.18-12422-1404437174-186.121321-15-0@perl.org
On Tue Feb 25 03:11:58 2014, demerphq wrote:
> On 25 February 2014 11:16, yves orton <perlbug-followup@perl.org>
> wrote:
> > # New Ticket Created by  yves orton
> > # Please include the string:  [perl #121321]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: https://rt.perl.org/Ticket/Display.html?id=121321 >
> >
> >
> > The following code infinite loops:
> >
> > ./perl -Mre=Debug,ALL -Ilib -E'qr/(a)(b)(c)(d)(e)(f)(g)(h)(i)\10/'
> 
> I just pushed:
> 
> commit 845ab12d77c07580053486e445977dc895d747f8
> Author: Yves Orton <demerphq@gmail.com>
> Date:   Tue Feb 25 12:07:18 2014 +0100
> 
> Fix RT #121321 - Fencepost error causes infinite loop in regex
> compilation
> 
> Due to a fencepost error if a pattern had more than 9 capture buffers
> and after the last capture buffer there was an octal style escape
> which
> when interpreted as decimal evaluated to one more than the number of
> defined buffers then the regex compiler would go into an infinite
> loop.
> 
> This fixes the fencepost error, adds tests, and adds some comments to
> explain what is going on.
> 
> This ticket can be closed.
> 

Doing so.

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=121321



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