util/hash_table: Assert that keys are not reserved pointers
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 5 Jun 2019 22:30:47 +0000 (17:30 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 6 Jun 2019 00:27:53 +0000 (00:27 +0000)
commitb38dab101ca7e0896255dccbd85fd510c47d84d1
treebc79f13b3a1970ee326f9f78741cc5015c95bc02
parent8306dabc03c9a030cacd078b56446e6548224a23
util/hash_table: Assert that keys are not reserved pointers

If we insert a NULL key, it will appear to succeed but will mess up
entry counting.  Similar errors can occur if someone accidentally
inserts the deleted key.  The later is highly unlikely but technically
possible so we should guard against it too.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/util/hash_table.c