reproducer:
declare -A aaa
aaa='somestring'
unset aaa
This commands cause segmentation fault, free unallocated memory.
Chet do you already fix it? Here is my fast patch.
RR
diff -up bash-4.0/hashlib.c.alloc bash-4.0/hashlib.c
--- bash-4.0/hashlib.c.alloc 2009-08-25 16:25:21.000000000 +0200
+++ bash-4.0/hashlib.c 2009-08-25 16:25:52.000000000 +0200
@@ -193,7 +193,7 @@ hash_search (string, table, flags)
table->bucket_array[bucket] = list;
list->data = NULL;
- list->key = (char *)string; /* XXX fix later */
+ list->key = (char *)savestring (string); /* XXX fix later */
list->khash = hv;
list->times_found = 0;