Re: Memory leak in bash 4.3

2015-06-22 Thread Jean Delvare
Hi Chet, On Mon, 22 Jun 2015 09:40:36 -0400, Chet Ramey wrote: > > My hope was that the updated patch I'm about to send would be released > > as bash43-040 in bash-4.3-patches/. Does that make sense, or am I > > missing something obvious? > > Here's a corrected patch, and eventually this will be

Re: Memory leak in bash 4.3

2015-06-22 Thread Chet Ramey
> My hope was that the updated patch I'm about to send would be released > as bash43-040 in bash-4.3-patches/. Does that make sense, or am I > missing something obvious? Here's a corrected patch, and eventually this will be released as an official patch. Chet *** ../bash-4.3-patched/subst.c 2014

Re: Memory leak in bash 4.3

2015-06-15 Thread Jean Delvare
On Mon, 15 Jun 2015 09:12:58 -0400, Chet Ramey wrote: > On 6/15/15 9:09 AM, Jean Delvare wrote: > > >> I made > >> this change back in October 2014 as part of an unrelated fix for an > >> array element quoting issue. > > > I'll submit an updated patch. > > See above. I know it's fixed in the de

Re: Memory leak in bash 4.3

2015-06-15 Thread Chet Ramey
On 6/15/15 9:09 AM, Jean Delvare wrote: >> I made >> this change back in October 2014 as part of an unrelated fix for an >> array element quoting issue. > I'll submit an updated patch. See above. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita

Re: Memory leak in bash 4.3

2015-06-15 Thread Jean Delvare
Hi Chet, Thanks for your reply. On Thu, 11 Jun 2015 10:54:31 -0400, Chet Ramey wrote: > On 6/9/15 3:42 PM, Jean Delvare wrote: > > > I think I have a minimal test case now: > > > > #!/bin/bash > > > > declare -a ARRAY > > > > ARRAY[0]=foo > > FOO=${ARRAY[0]} # <-- leaks > > echo $FOO > > > >

Re: Memory leak in bash 4.3

2015-06-11 Thread Chet Ramey
On 6/9/15 3:42 PM, Jean Delvare wrote: > I think I have a minimal test case now: > > #!/bin/bash > > declare -a ARRAY > > ARRAY[0]=foo > FOO=${ARRAY[0]} # <-- leaks > echo $FOO > > And a candidate fix: > > bash 4.3: Fix memory leak in parameter_brace_expand_word Thanks for the report. This

Re: Memory leak in bash 4.3

2015-06-09 Thread Jean Delvare
On Tue, 9 Jun 2015 18:02:31 +0200, Jean Delvare wrote: > I built bash 4.3.39 with --without-bash-malloc and then ran the daemon > under valgrind for 1 minute. The back trace for the leak is: > > 3,973 bytes in 430 blocks are definitely lost in loss record 1,610 of 1,613 >at 0x4C277AB: malloc (