On 11/20/22 8:02 AM, Ralf Oehler wrote:

Bash Version: 5.2
Patch Level: 2
Release Status: release

Description:
        I want to read an associative array. Like so: y="${aa[$i]}"
        If aa contains the element queried, then everything works as expected
        If aa does not contain such an element, the result is the empty string, 
which is expected, but the query permanently increases the memory consumption 
of the executing bash, which is not expected. The program below demonstrates 
this behaviour. When run, the bash process increases its memory indefinitely.

        I did not find a fix.

Thanks for the report. Koichi's fix is a good one.

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