bug-bash
[Top][All Lists]
Advanced

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

Re: Bug with declarative arrays


From: Chet Ramey
Subject: Re: Bug with declarative arrays
Date: Thu, 18 Feb 2016 14:27:34 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

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 (address@hidden 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    address@hidden    http://cnswww.cns.cwru.edu/~chet/

Attachment: array-keys-memleak.patch
Description: Source code patch


reply via email to

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