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
The pre-match copy leaks #14364
Comments
From @cpansproutRun this little script and watch the memory usage go up: print "$$\n"; Every time we do a substitution, we get a new pre-match copy stored in the last subst op. And that copy is not freed until the same subst op is executed again. This whole PL_curpm mechanism needs to be reworked. (I know this has been said many times before, but I have only just noticed this particular symptom.) Currently PL_curpm, a global variable, is set to point to the last match op that was successfully executed. It gets saved and restored upon scope entry. Instead of having the information necessary for -- Father Chrysostomos |
From @demerphqOn 24 December 2014 at 02:46, Father Chrysostomos
A big problem is that we store regex match results in the same struct A much better approach would be to separate match results from the And then we could easily do what you suggest here. Anyway, the whole PL_curpm is horrible, anything to improve it is a Yves -- |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Tue Dec 23 18:09:54 2014, demerphq wrote:
I know, and that’s what makes it hard to fix. That’s why I’m creating a ticket instead of just fixing it. :-) -- Father Chrysostomos |
From @cpansproutOn Tue Dec 23 18:09:54 2014, demerphq wrote:
What I suggest would actually change the behaviour of something like this: my $proto = ";+"; Currently the value of $1 is remembered in the second entry into the block. I hope nobody is depending on that behaviour. (I just encountered this in B::Deparse, where it was causing an infinite loop.) -- Father Chrysostomos |
Migrated from rt.perl.org#123492 (status was 'open')
Searchable as RT123492$
The text was updated successfully, but these errors were encountered: