[Top][All Lists]

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

Re: Memory leak in subshell + read before bash 4.4

From: Chet Ramey
Subject: Re: Memory leak in subshell + read before bash 4.4
Date: Fri, 3 Nov 2017 20:18:47 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 11/3/17 6:01 PM, Adrien Mahieux wrote:
> Hello,
> I think I've found a bug in the loop management. Maybe it's an
> expected behavior (didn't find any related topic on the manpages) but
> it's annoying in long-running scripts.
> The leak is triggered by this idiom (wether or not jobcontrol + lastpipe) :
> cmd | read var
> but not by this one :
> read var < <(cmd)
> Tested with :
> - bash-4.2.46-19.el7.x86_64
> - bash-4.3.42-5.fc23.x86_64
> - bash-4.3-48.x86_64
> From the version tested, it was fixed in version 4.4 (tested 4.4-beta)
> Do you have an idea of the commit that fixed this behavior, so the fix
> can be backported to older versions ?

Have you tried bisecting the devel git branch?

``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]