[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory leak in 5.1 when redeclaring arrays

From: Chet Ramey
Subject: Re: Memory leak in 5.1 when redeclaring arrays
Date: Tue, 12 Jan 2021 11:50:19 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

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

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

        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.


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]