3 if [ $# -eq 3 -a "$2" = '-d' ]; then
5 elif [ $# -ne 1 ]; then
6 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
11 -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
13 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
18 # DP: <your description>
19 Andreas Schwab <schwab@linux-m68k.org> writes:
21 > $ declare -A a=b; unset a
22 > *** glibc detected *** /bin/bash: free(): invalid pointer: 0x10091644 ***
24 And the obvious patch:
26 --- bash-4.1/builtins/declare.def.~1~ 2009-11-26 01:42:00.000000000 +0100
27 +++ bash-4.1/builtins/declare.def 2010-04-09 19:20:51.000000000 +0200
28 @@ -512,7 +512,7 @@ declare_internal (list, local_var)
30 /* let bind_{array,assoc}_variable take care of this. */
32 - bind_assoc_variable (var, name, "0", value, aflags);
33 + bind_assoc_variable (var, name, savestring ("0"), value, aflags);
35 bind_array_variable (name, 0, value, aflags);