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 23, 2018 03:27
Subject:
Re: [perl #132892] Possibly memory leak when matching strings usingpre-compiled regexes stored in hash key (perl >= v5.26)
Message ID:
CANgJU+VN-O7K23aQwix1pwc5UvbB6RGk=a5JS1am1yFV+JiP5g@mail.gmail.com
On 22 February 2018 at 12:29, Sergey Aleynikov via RT
<perlbug-followup@perl.org> wrote:
> Bisect points to commit b10cb25a6c86fd96fff8f2dfa6d8df3e6b51a451
> Author: Yves Orton <demerphq@gmail.com>
> Date:   Sat Sep 17 20:14:53 2016 +0200
>
>     regcomp.c: S_concat_pat: guard against missing trailing nulls
>
>     The regex engine expects the pattern to have a null byte at
>     SvEND(pat), but is not guaranteed to receive such a pattern
>     when it is called, so S_concat_pat should guard against this
>     case. It turns out this is only an issue when there is exactly
>     one "argument" to the pattern. (Consider concatenation rules, etc).

Thanks, I forgot an sv_2mortal in that patch, I will push a fix soon.

Much obliged for the bisect!

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