develooper Front page | perl.perl5.porters | Postings from February 2018

Re: [perl #132892] Possibly memory leak when matching strings usingpre-compiled regexes stored in hash key (perl >= v5.26)

Thread Previous | Thread Next
From:
demerphq
Date:
February 25, 2018 16:18
Subject:
Re: [perl #132892] Possibly memory leak when matching strings usingpre-compiled regexes stored in hash key (perl >= v5.26)
Message ID:
CANgJU+X3oCkMA_CYw-g=GTDYWAkW10pnxj12WC+_W6_n68hvpg@mail.gmail.com
On 25 February 2018 at 12:03, Sergey Aleynikov via RT
<perlbug-followup@perl.org> wrote:
> On Sun, 25 Feb 2018 02:57:09 -0800, demerphq wrote:
>
>> That sounds correct, but i dont think the regex engine has any way to
>> know that this LEN=0 case comes from a key. Since we don't know the
>> len we cant safely check past CUR.
>
> But you can check for SvIsCOW_shared_hash, which guarantees it to be from sharepvn.

Thanks again for your help, i have pushed a patch to implement this suggestion:

f1d945b85ac2d18ddd1ed2e1d4f72011246d905a

cheers,
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