]> gitweb.factorcode.org Git - factor.git/commit
hash-sets,hashtables: make it so the array backing the hash is non-empty
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 5 Oct 2016 17:09:55 +0000 (19:09 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 5 Oct 2016 17:19:39 +0000 (19:19 +0200)
commit6f10f06c2776c8dfa7e727f2a000dc48bd296bf0
tree878eb7fff7e3abbfff91792410f67b795fb4e663
parent78d9065db0ad87041b519b888f729f820ea49f9f
hash-sets,hashtables: make it so the array backing the hash is non-empty

Commit 70c7f9e02910746918cc16bf588ef543fda80790 made it so the code
assumes the array is not empty. But it can be empty if the hashtable is
created using "hashtable new" and then it can crash because it reads
uninitialized memory. Setting the initial of the array slot to
a valid hash-array should fix that.
core/hash-sets/hash-sets.factor
core/hashtables/hashtables-tests.factor
core/hashtables/hashtables.factor