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

Re: [perl #126182] /(.(?2))((?<=(?=(?1)).))/ hangs and eats allavailable RAM

Thread Previous | Thread Next
From:
demerphq
Date:
March 2, 2016 10:01
Subject:
Re: [perl #126182] /(.(?2))((?<=(?=(?1)).))/ hangs and eats allavailable RAM
Message ID:
CANgJU+WZB6zTKShBmNu+UMREp97prph6Amx5Op8+ENGC41r3Vg@mail.gmail.com
On 2 March 2016 at 00:58, James E Keenan via RT
<perlbug-followup@perl.org> wrote:
> On Tue Oct 13 23:05:46 2015, victor@drawall.cc wrote:
>> My bad, my “How to reproduce section” is wrong. When matched against
>> an empty string, the regex will fail immediately, as expected. The
>> problems only start when it is applied to a non-empty string, as in :
>>
>> perl -e '"a"=~/(.(?2))((?<=(?=(?1)).))/'
>>
>> I’ve just reproduced it on the latest blead
>> (f83e001e339db3eb180f5f1918c268681665839d).
>>
>> I’d recommend doing a `ulimit -Sv 1048576` or some such before running
>> the command, to prevent it from getting out of control.
>>
>
> And here it is at today's blead (on Linux x86_64):
> #####
> $ git show | head -1
> commit f24480bcc6bbe9061c0ff1595df8d3eadb2ab8db
>
> $ ulimit -Sv 1048576 && ./perl -Ilib -e '"a"=~/(.(?2))((?<=(?=(?1)).))/'
> Out of memory!

Yeah, I know. This is still on my todo list. All I can say is that I
am now "back" hacking after being away for a while dealing with the
passing of my father and hope to get to it sooner than later.

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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