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
Memory leak with regex in 5.10.0 #9504
Comments
From robin.hill@biowisdom.comCreated by robin.hill@biowisdom.comThis is a bug report for perl from robin.hill@biowisdom.com, ----------------------------------------------------------------- The following example script steadily increases in memory usage ######################################################### use strict; my $text = 'Test string'; for my $str (1..10000) { Changing the character classes to include more than one character Perl Info
|
From @iabynOn Wed, Oct 01, 2008 at 05:51:41AM -0700, robin.hill@biowisdom.com (via RT) wrote:
The leak appears to be somewhere in the compilation of character classes. while (1) { -- |
The RT System itself - Status changed from 'new' to 'open' |
From @nwc10On Sat, Oct 04, 2008 at 12:55:04PM +0100, Dave Mitchell wrote:
Are you sure that it's character classes? ./perl -le 'while (1) { qr// }' merrily chews through memory like it's going out of fashion. However, all $ PERL_DESTRUCT_LEVEL=2 valgrind ./perl -le 'for (1..100000) { qr/[a]/ }' Which makes me think that the problem is somewhere in how regexps are allocated Nicholas Clark |
From @iabynOn Sat, Oct 04, 2008 at 02:51:09PM +0100, Nicholas Clark wrote:
Hmm, maybe I reduced the original code too much, and threw out the This doesn't leak: my $n = 1; This does: my $n = 1; (The non-constant $n is to defeat regex compilation caching). -- |
From @nwc10On Sat, Oct 04, 2008 at 03:02:32PM +0100, Dave Mitchell wrote:
Hmm, but that one still cleans up after itself: $ cat 59516 (the while loop version still munches away though) Nicholas Clark |
From @mhxOn 2008-10-04, at 14:51:09 +0100, Nicholas Clark wrote:
Fixed with the following change: Change 34506 by mhx@mhx-r2d2 on 2008/10/18 18:04:40 Fix memory leak in qr// operator. This was most probably Affected files ... ... //depot/perl/pp_hot.c#578 edit Differences ... ==== //depot/perl/pp_hot.c#578 (text) ==== @@ -1212,6 +1212,7 @@ if (pkg) {
-- |
From @mhxOn 2008-10-04, at 15:02:32 +0100, Dave Mitchell wrote:
Fixed with the following change: Change 34507 by mhx@mhx-r2d2 on 2008/10/18 18:11:57 Fix memory leak in // caused by single-char character class Affected files ... ... //depot/perl/regcomp.c#660 edit Differences ... ==== //depot/perl/regcomp.c#660 (text) ==== @@ -8350,6 +8350,9 @@ -- |
From @mhxFixed in bleadperl by change #34507. |
@mhx - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#59516 (status was 'resolved')
Searchable as RT59516$
The text was updated successfully, but these errors were encountered: