develooper Front page | perl.perl5.porters | Postings from November 2016

Re: [perl #129903] regexec.c stack overflow

Thread Previous | Thread Next
From:
demerphq
Date:
November 1, 2016 12:35
Subject:
Re: [perl #129903] regexec.c stack overflow
Message ID:
CANgJU+VYgK0RvASy+Eqpk+d6mTmiFMdCL77V7fZKBHBYX0ErbA@mail.gmail.com
On 20 October 2016 at 22:12, Father Chrysostomos via RT
<perlbug-followup@perl.org> wrote:
> On Thu Oct 20 00:37:45 2016, demerphq wrote:
>> On 19 October 2016 at 23:29, demerphq <demerphq@gmail.com> wrote:
>> So following up for this I put together a quick hack to make it
>> possible to use the empty pattern in regexen, but honestly I dont see
>> how it is very useful, it is all too easy to create an infinite loop
>> (which luckily seems to be easy to detect).
>>
>> ./perl -le'$_="aa"; /a/; /(?{ s!!x! })/; print; //; print'
>> xa
>> Infinite recursion via empty pattern at -e line 1.
>>
>> I personally think this is no less ugly than the previous patch, but
>> if you prefer it I can push it.
>
> I would prefer it, but I do not feel strongly about it.

Well I just push a patch to meet your preference.

>> FWIW, this seems to be yet another good reason to get rid of the empty
>> pattern.
>
> I am still opposed to that, unfortunately. :-)

We can debate that one (again) in another thread. :-)

Yves

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