diff options
author | Tomeu Vizoso <[email protected]> | 2019-08-05 11:22:49 +0200 |
---|---|---|
committer | Tomeu Vizoso <[email protected]> | 2019-08-08 07:42:52 +0200 |
commit | 5804d75b9c413ddac8f5f5ada6043b5ee854e3d3 (patch) | |
tree | 77771702ef50d6c44a6c5836d14110062e43401c /src/gallium/drivers/panfrost | |
parent | aba57b11ee8c6d4be225f6e22ae00d96b1833d73 (diff) |
util/hash_table: Fix hashing in clears on 32-bit
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).
When in 32-bit arch a 64-bit key value doesn't fit into a pointer, so
hash_table_u64 internally use a pointer to a struct containing the
64-bit key value.
Fix _mesa_hash_table_u64_clear() to handle the 32-bit case by creating a
temporary hash_key_u64 to pass to the hash function.
Signed-off-by: Tomeu Vizoso <[email protected]>
Suggested-by: Caio Marcelo de Oliveira Filho <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Cc: Samuel Pitoiset <[email protected]>
Cc: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost')
0 files changed, 0 insertions, 0 deletions