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 09:50
Subject:
Re: [perl #132892] Possibly memory leak when matching strings usingpre-compiled regexes stored in hash key (perl >= v5.26)
Message ID:
CANgJU+VcR4NQJPcY_-z=YThszA4-PVoNpDL3AmcRbbtOT36v0g@mail.gmail.com
On 23 February 2018 at 14:03, Dave Mitchell <davem@iabyn.com> wrote:
> On Fri, Feb 23, 2018 at 10:34:50AM +0100, demerphq wrote:
>> Fixed in 910a6a8be166fb3780dcd2520e3526e537383ef2
>>
>> Unfortunately I don't know how to test for a memory leak, so no tests included.
>
> see t/op/svleak.t. It runs a bit of code several times in a loop and
> tests whether PL_sv_count fails to remain constant.

Thanks, i just pushed 06f26dc89ebc43d50835aaecc477ec160a5a5835 which
does just that.

FWIW, there is still an open question why this happens at all. Keys
should be null terminated, and we should not fall into this code-path.

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