On 1/12/21 5:51 AM, Alexander Mescheryakov wrote:

Bash Version: 5.1
Patch Level: 4
Release Status: release

Description:
        Redeclaring array variable leads to leaked memory in bash 5.1

     It is required to define var as `declare -a FOO=(a b c)`
     defining it simply as `FOO=(a b c)` does not introduce memory leak.

It's strange. The process RSS size definitely grows, but valgrind and other
tools don't report any leaks. I'll have to look at it.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to