mirror of
https://github.com/mirror/wget.git
synced 2025-03-05 07:10:17 +08:00
* src/hash.c: Silence UBSAN for hash functions
This commit is contained in:
parent
cdaee00259
commit
3cbdc67c96
@ -634,6 +634,9 @@ hash_table_count (const struct hash_table *ht)
|
||||
this one seems to perform much better, both by being faster and by
|
||||
generating less collisions. */
|
||||
|
||||
#ifdef __clang__
|
||||
__attribute__((no_sanitize("integer")))
|
||||
#endif
|
||||
static unsigned long
|
||||
hash_string (const void *key)
|
||||
{
|
||||
@ -672,6 +675,9 @@ make_string_hash_table (int items)
|
||||
|
||||
/* Like hash_string, but produce the same hash regardless of the case. */
|
||||
|
||||
#ifdef __clang__
|
||||
__attribute__((no_sanitize("integer")))
|
||||
#endif
|
||||
static unsigned long
|
||||
hash_string_nocase (const void *key)
|
||||
{
|
||||
@ -710,6 +716,9 @@ make_nocase_string_hash_table (int items)
|
||||
Knuth's multiplication hash, this function doesn't need to know the
|
||||
hash table size to work. */
|
||||
|
||||
#ifdef __clang__
|
||||
__attribute__((no_sanitize("integer")))
|
||||
#endif
|
||||
unsigned long
|
||||
hash_pointer (const void *ptr)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user