On 5/2/21 8:19 AM, [email protected] wrote:
Bash Version: 5.1
Patch Level: 4
Release Status: release
Description:
There seems to be a memory leak in bash when a local array is declared
within a function.
I also tested this on "GNU bash, version 5.0.17(1)-release
(x86_64-redhat-linux-gnu)" and that one works without any leaks.
Repeat-By:
#!/bin/bash
leak() { local arr=("leak"); }
while :; do leak; done
Thanks for the report. This was fixed back in January as the result of
https://lists.gnu.org/archive/html/bug-bash/2021-01/msg00082.html.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/