Re: [Mesa-dev] [PATCH v2 1/5] util/hash_table: Fix hashing in clears on 32-bit

2019-08-07 Thread Caio Marcelo de Oliveira Filho
On Wed, Aug 07, 2019 at 10:36:53AM +0200, Tomeu Vizoso wrote: > Some hash functions (eg. key_u64_hash) will attempt to dereference the > key, causing an invalid access when passed DELETED_KEY_VALUE (0x1) or > FREED_KEY_VALUE (0x0). > > To avoid this problem, stuff the fake keys into a hash_key_u64

[Mesa-dev] [PATCH v2 1/5] util/hash_table: Fix hashing in clears on 32-bit

2019-08-07 Thread Tomeu Vizoso
Some hash functions (eg. key_u64_hash) will attempt to dereference the key, causing an invalid access when passed DELETED_KEY_VALUE (0x1) or FREED_KEY_VALUE (0x0). To avoid this problem, stuff the fake keys into a hash_key_u64 struct and pass the pointer to it instead. Signed-off-by: Tomeu Vizoso