-
Notifications
You must be signed in to change notification settings - Fork 574
5.24.1 - Memory leak in regexp #15746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From bitcard-120630@kirpa.comHuge memory leak in case not very clean regular expression used within cycle. Problem exists only in perl 5.24. Versions 5.20 and 5.22 do not have this problem. Please see below leak.pl, leak-report.sh, 20161204020211_leak_report.txt and perlbug -d Best regards, my $v=q{(\b)([a ])(?:13[;]12)3213(\b)}; my $v2=q{"$1$2aaaa$3"}; for (1..5) Flags: Site configuration information for perl 5.24.1: Configured by perl at Thu Oct 13 00:42:09 EEST 2016. Summary of my perl5 (revision 5 version 24 subversion 1) configuration: Platform: Locally applied patches: @INC for perl 5.24.1: Environment for perl 5.24.1: |
From bitcard-120630@kirpa.comSorry for unsuccessful content. Huge memory leak in case not very clean regular expression used within cycle. Problem exists only in perl 5.24. Versions 5.20 and 5.22 do not have this problem. Please see below leak.pl, leak-report.sh, 20161204020211_leak_report.txt and perlbug -d output. Best regards, my $v=q{(\b)([a ])(?:13[;]12)3213(\b)}; my $v2=q{"$1$2aaaa$3"}; for (1..5) Flags: Site configuration information for perl 5.24.1: Configured by perl at Thu Oct 13 00:42:09 EEST 2016. Summary of my perl5 (revision 5 version 24 subversion 1) configuration: Platform: Locally applied patches: @INC for perl 5.24.1: Environment for perl 5.24.1: |
From [Unknown Contact. See original ticket]Sorry for unsuccessful content. Huge memory leak in case not very clean regular expression used within cycle. Problem exists only in perl 5.24. Versions 5.20 and 5.22 do not have this problem. Please see below leak.pl, leak-report.sh, 20161204020211_leak_report.txt and perlbug -d output. Best regards, my $v=q{(\b)([a ])(?:13[;]12)3213(\b)}; my $v2=q{"$1$2aaaa$3"}; for (1..5) Flags: Site configuration information for perl 5.24.1: Configured by perl at Thu Oct 13 00:42:09 EEST 2016. Summary of my perl5 (revision 5 version 24 subversion 1) configuration: Platform: Locally applied patches: @INC for perl 5.24.1: Environment for perl 5.24.1: |
From @jkeenanOn Sun, 04 Dec 2016 00:38:47 GMT, ank_120630 wrote:
I ran your program with both "warnings" ('no warnings in block commented out) and without ('no warnings uncommented). I'm not very familiar with Test::LeakTrace::Script, but I note that when I uncommented 'no warnings' in the block, I did not eliminate *all* memory leaks. It appears that there remain a leaked SCALAR and a leaked REGEXP. Is that a concern? I'll attach the two different leak reports. Thank you very much. -- |
From @jkeenanleaked SCALAR(0x11c2178) from leak.pl line 17. |
From @jkeenanleaked SCALAR(0x23b7418) from leak.pl line 17. |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Sun, 04 Dec 2016 00:38:47 GMT, ank_120630 wrote:
List: Does anyone know how to use Porting/bisect.pl to identify the commit where the (additional) memory leakage occured? Thank you very much. -- |
From @jkeenanOn Sun, 04 Dec 2016 00:38:47 GMT, ank_120630 wrote:
I built perl 5 blead and installed Test::LeakReport against it. ##### When I expected the leak report (attached), I did not see the long (12 leakages) leak report than you and I got at 5.24.0 -- only a short (2 leadages) report. Is it possible that the problem has already been corrected? Thank you very much.
-- |
From @jkeenanleaked REGEXP(0x13b8d78) from leak.pl line 18. |
From @demerphqOn 5 December 2016 at 02:14, James E Keenan via RT
Yes. A patch I worked on with various others, including Karl was As far as I know this was not a true "leak" as once the regex What were other 2 leakages? Yves |
From @demerphqOn 5 December 2016 at 11:19, demerphq <demerphq@gmail.com> wrote:
Eg: commit 7eec73e move warning text to RExC_state (via RExC_warn_text) This way we reuse the same AV each time, and avoid various commit ee072c8 [perl #128313] Fix leak in perl 5.24 with strict and regex posix This patch is a refinement of one written by Dan Collins. Any thanks for this patch should go to him. Yves -- |
From bitcard-120630@kirpa.comOn Mon, 05 Dec 2016 02:19:53 -0800, demerphq wrote:
|
From @iabynOn Mon, Dec 05, 2016 at 06:30:01PM -0800, Alexander Kirpa via RT wrote:
I agree that if you replace the 'for (1..5)' with an infinite loop, then Under blead that leak has been fixed.
I think Test::LeakTrace is wrong there. For a run-time pattern match, $ cat $ perl5257t -Mblib -MTest::LeakTrace::Script=-verbose ~/tmp/p change the loop to (1..5) and you get the same result. $ perl5257t -Mblib -MTest::LeakTrace::Script=-verbose ~/tmp/p Change the loop to be infinite, and when run (without Put the pattern match in a string eval (so the match op is freed each eval q{"a" =~ /$pat/;}; and MTest::LeakTrace gives no output. -- |
@iabyn - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.26.0, this and 210 other issues have been Perl 5.26.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#130254 (status was 'resolved')
Searchable as RT130254$
The text was updated successfully, but these errors were encountered: