These bugs result in gradual slowdown of indefinitely-running scripts which
rely on parameter substitution (rather than forking sed or awk) for speed
and efficiency. Forgive me if I used the wrong terminology, but whether
these bugs are considered honest-to-goodness "memory leaks" by valgrind
seems unimportant.

Are you saying these bugs have been fixed, and that they no longer exist in
bash 4.3?


On Tue, Jan 7, 2014 at 11:12 AM, Chet Ramey <chet.ra...@case.edu> wrote:

> On 1/7/14, 2:27 AM, toddbst...@gmail.com wrote:
>
> > Repeat-By:
> >       These can all be demonstrated by running a script consisting of an
> infinite loop which repeatedly executes any command utilizing any of the
> above examples. Like this:
> >
> >               #!/bin/bash
> >
> >               while :; do
> >                       echo ${variable/pattern}
> >               done
> >
> >       The resident memory size will continually grow. This occurs on
> both CentOS 6.5 (bash 4.1.2) and Fedora 20 (bash 4.2.45).
>
> Have you run any of these through valgrind? I ran a few, and it did not
> report any leaks, at least on bash-4.3-rc1. The increase in memory size is
> probably from malloc  getting memory from the kernel but not releasing it
> back to the kernel after bash calls free (giving memory back to the kernel
> is harder than you think).
>
> Chet
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU    c...@case.edu
> http://cnswww.cns.cwru.edu/~chet/
>

Reply via email to