bug-bash
[Top][All Lists]
Advanced

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

Re: declare -A a=b crashes bash


From: Dennis van Dok
Subject: Re: declare -A a=b crashes bash
Date: Fri, 09 Apr 2010 20:29:21 +0200
User-agent: Thunderbird 2.0.0.24 (X11/20100317)

Andreas Schwab schreef:
> Andreas Schwab <schwab@linux-m68k.org> writes:
> 
>> $ declare -A a=b; unset a
>> *** glibc detected *** /bin/bash: free(): invalid pointer: 0x10091644 ***
> 
> And the obvious patch:

Thanks!

So...this affects Ubuntu 9.10

https://bugs.launchpad.net/ubuntu/+source/bash/+bug/516974

Is the 4.0 branch still supported and is this going to be patched? Or
should Ubuntu patch this as a vendor patch?

Just wondering.

Cheers,

Dennis

> 
> --- bash-4.1/builtins/declare.def.~1~ 2009-11-26 01:42:00.000000000 +0100
> +++ bash-4.1/builtins/declare.def     2010-04-09 19:20:51.000000000 +0200
> @@ -512,7 +512,7 @@ declare_internal (list, local_var)
>           {
>             /* let bind_{array,assoc}_variable take care of this. */
>             if (assoc_p (var))
> -             bind_assoc_variable (var, name, "0", value, aflags);
> +             bind_assoc_variable (var, name, savestring ("0"), value, 
> aflags);
>             else
>               bind_array_variable (name, 0, value, aflags);
>           }
> 
> Andreas.
> 





reply via email to

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