summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--hash.c2
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6307ecbd..b20f8c2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2015-06-07 Kaz Kylheku <kaz@kylheku.com>
+ Critical bugfix for weak hashes.
+
+ * hash.c (hash_mark): Hash tables which have both weak keys
+ and values were not added to the reachable_weak_hashes list,
+ and thus not subject to complete hash processing, leading
+ to corruption.
+
+2015-06-07 Kaz Kylheku <kaz@kylheku.com>
+
* lib.h (mkloc): Rename misleading argument from fun to obj.
2015-06-07 Kaz Kylheku <kaz@kylheku.com>
diff --git a/hash.c b/hash.c
index f5130e73..1368376a 100644
--- a/hash.c
+++ b/hash.c
@@ -422,6 +422,8 @@ static void hash_mark(val hash)
break;
case hash_weak_both:
/* Values and keys are weak: don't mark anything. */
+ h->next = reachable_weak_hashes;
+ reachable_weak_hashes = h;
break;
}
}