On 7/5/16 3:29 PM, remi salard wrote: > Bash Version: 4.3 > Patch Level: 30 > Release Status: release > > Description: > Hello, > > I observed a memory leak when a bash array is created as a local > variable inside a function. > > Regards, > > Rémi > > Repeat-By: > > The following code (from > http://bug-bash.gnu.narkive.com/DaBdE5P0/memory-leak-on-arrays-in-functions) > shows this > regression: > > #!/bin/bash > run() { local -a A=(); local -a A=(); } > while :; do run; done
Thanks for the report. This was reported and fixed a year ago (a different issue from the one in the link, but with the same reproducer). The fix is in the devel branch and all prereleases of bash-4.4. 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/