Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Cause:
Including file with "use utf8"
Consequence:
When perl includes a file with "use utf8" and text constants it leaks memory.
Fix:
Upstream fix that the temp utf8 copy of namepv is correctly freeing.
Result:
Including "use utf8" and constant does not leak.
+++ This bug was initially created as a clone of Bug #1062576 +++
Description of problem:
Every time perl includes a file with "use utf8" and text constants it leaks memory.
Version-Release number of selected component (if applicable):
perl-5.16.3-266.fc19.x86_64
How reproducible:
always
Steps to Reproduce:
1. run the test program below
2. watch as memory usage grows
Here is the test program:
-------------------------
my $mem = 0;
sub report_memory () {
my $next_mem = qx[ps -p $$ -o size=]+0;
printf "%+8d = %8d K\n", $next_mem-$mem, $next_mem; $mem = $next_mem;
}
for (0..1e5) {
do 'x.inc';
report_memory unless $_ % 1e4;
}
-------------------------
x.inc contains:
-------------------------
use utf8;
$x='x';
-------------------------
--- Additional comment from Petr Pisar on 2014-02-10 13:49:09 GMT ---
Upstream report <https://rt.perl.org/Public/Bug/Display.html?id=121200>.
--- Additional comment from Petr Pisar on 2014-02-10 14:09:35 GMT ---
All Fedoras are affected (confirmed on perl-5.18.2-296.fc21.x86_64, perl-5.18.2-289.fc20.x86_64, perl-5.16.3-266.fc19.x86_64).
------
RHEL-7 is affected (perl-5.16.3-283.el7.x86_64).
How reproduce:
1) Install perl
2) Create test data file
x.inc contains:
-------------------------
use utf8;
$x='x';
-------------------------
3) Create the test program:
-------------------------
my $mem = 0;
sub report_memory () {
my $next_mem = qx[ps -p $$ -o size=]+0;
printf "%+8d = %8d K\n", $next_mem-$mem, $next_mem; $mem = $next_mem;
}
for (0..1e5) {
do 'x.inc';
report_memory unless $_ % 1e4;
}
-------------------------
4) Run the test and watch the memory usage
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-2191.html