Red Hat Bugzilla – Bug 1273513
tcsh memory leak with source command
Last modified: 2016-11-03 21:46:30 EDT
+++ This bug was initially created as a clone of Bug #1134132 +++
Description of problem:
tcsh appears to leak some memory during every invocation of its 'source' command
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a script to source:
% touch noop.csh
2.Sit in a loop, continuously invoking 'source':
% while (1)
while? source noop.csh
3. Watch memory grow on the tcsh process
Memory growth (without any apparent limit) on the tcsh process
No memory growth
The leak appears to be rather small and would require a lot of source invocations to consume any significant amount of memory. But this can still be an issue for long-running tcsh environments.
--- Additional comment from Angelo Bonet on 2014-09-08 15:26:58 EDT ---
Upstream bug report: http://bugs.gw.com/view.php?id=377
--- Additional comment from Fridolín Pokorný on 2014-09-09 05:11:24 EDT ---
Thanks! I was going to upload the patch, but you were faster. The upstream fix is only partial; I still get memory leaks. The problem is that variable "paraml" is overwritten and allocated memory is lost (there should be freelex() called).
To merge upstream changes, our file file locking patch has to be adjusted (tcsh-6.18.00-history-file-locking.patch).
--- Additional comment from David Kaspar [Dee'Kej] on 2015-10-19 13:47:52 EDT ---
This problem was already fixed by upstream in tcsh version 6.19.00. It is a simple "one-liner" fix:
Extracting the patch and creating the reproducer shouldn't be any problem.
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.