bug-bash
[Top][All Lists]
Advanced

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

Re: memory leak in case of "read -e"


From: Chet Ramey
Subject: Re: memory leak in case of "read -e"
Date: Wed, 22 Feb 2017 09:44:41 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

On 2/22/17 2:33 AM, ZhangXiao wrote:
> Hi Chet and experts,
> 
> Build in command "read" with "-e" option causes memory leak. Can be
> reproduced with below script and lots of input data.
> 
> $cat script.sh
> #!/bin/bash/bash
> while [ 1 ];
> do
>         read -e data;
>         echo $data;
> done
> $./script.sh
> 
> 
> The patch at the end of this mail can fix it.

Thanks for the report and fix.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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