[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Memory leak in bash 4.3
From: |
Chet Ramey |
Subject: |
Re: Memory leak in bash 4.3 |
Date: |
Thu, 11 Jun 2015 10:54:31 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
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 is the right place for the patch. I made
this change back in October 2014 as part of an unrelated fix for an
array element quoting issue.
(Your patch reuses `temp', but array_variable_part returns a SHELL_VAR *.)
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Memory leak in bash 4.3, Jean Delvare, 2015/06/09
- Re: Memory leak in bash 4.3, Jean Delvare, 2015/06/09
- Re: Memory leak in bash 4.3,
Chet Ramey <=
- Re: Memory leak in bash 4.3, Jean Delvare, 2015/06/15
- Re: Memory leak in bash 4.3, Chet Ramey, 2015/06/15
- Re: Memory leak in bash 4.3, Jean Delvare, 2015/06/15
- Re: Memory leak in bash 4.3, Chet Ramey, 2015/06/22
- Re: Memory leak in bash 4.3, Jean Delvare, 2015/06/22