From b50fa12ce36728c4bcc5a5ee7b0717ccedaef87b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 7 Jun 2015 21:37:36 -0700 Subject: 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. --- ChangeLog | 9 +++++++++ hash.c | 2 ++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6307ecbd..b20f8c2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2015-06-07 Kaz Kylheku + + 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 * lib.h (mkloc): Rename misleading argument from fun to obj. 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; } } -- cgit v1.2.3