On 2/18/16 11:39 AM, Emilio PastorMira wrote: > The bug I found is related to the possibility of obtaining all keys of a > declarative array at once (${!ARRAY[@]} syntax). It seems that every time > such a call is done there is memory allocation, which is NOT deallocated > when the corresponding scope ends. This produces a memory leak.
Thanks for the report. The fix was easy and will be in the next version of bash. I've attached a patch if you'd like to play around with it. Your line numbers will certainly vary. 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/
*** ../bash-4.3-patched/subst.c 2015-08-13 15:11:52.000000000 -0400 --- subst.c 2016-02-18 13:57:34.000000000 -0500 *************** *** 7353,7356 **** --- 8041,8045 ---- } + free (name); free (temp1); *indexp = sindex;