summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--random.c3
-rw-r--r--siphash.h2
-rw-r--r--st.c6
3 files changed, 9 insertions, 2 deletions
diff --git a/random.c b/random.c
index cd16a57b39..16f2453b69 100644
--- a/random.c
+++ b/random.c
@@ -112,6 +112,9 @@ struct MT {
#define genrand_initialized(mt) ((mt)->next != 0)
#define uninit_genrand(mt) ((mt)->next = 0)
+NO_SANITIZE("unsigned-integer-overflow", static void init_genrand(struct MT *mt, unsigned int s));
+NO_SANITIZE("unsigned-integer-overflow", static void init_by_array(struct MT *mt, const uint32_t init_key[], int key_length));
+
/* initializes state[N] with a seed */
static void
init_genrand(struct MT *mt, unsigned int s)
diff --git a/siphash.h b/siphash.h
index 2e7553f208..f49bc511b1 100644
--- a/siphash.h
+++ b/siphash.h
@@ -43,6 +43,6 @@ int sip_hash_digest_integer(sip_hash *h, const uint8_t *data, size_t data_len, u
void sip_hash_free(sip_hash *h);
void sip_hash_dump(sip_hash *h);
-uint64_t sip_hash13(const uint8_t key[16], const uint8_t *data, size_t len);
+NO_SANITIZE("unsigned-integer-overflow", uint64_t sip_hash13(const uint8_t key[16], const uint8_t *data, size_t len));
#endif
diff --git a/st.c b/st.c
index fd564b64d4..1d3d48b55f 100644
--- a/st.c
+++ b/st.c
@@ -1766,6 +1766,10 @@ st_values_check(st_table *tab, st_data_t *values, st_index_t size,
#define C1 BIG_CONSTANT(0x87c37b91,0x114253d5);
#define C2 BIG_CONSTANT(0x4cf5ad43,0x2745937f);
#endif
+NO_SANITIZE("unsigned-integer-overflow", static inline st_index_t murmur_step(st_index_t h, st_index_t k));
+NO_SANITIZE("unsigned-integer-overflow", static inline st_index_t murmur_finish(st_index_t h));
+NO_SANITIZE("unsigned-integer-overflow", extern st_index_t st_hash(const void *ptr, size_t len, st_index_t h));
+
static inline st_index_t
murmur_step(st_index_t h, st_index_t k)
{
@@ -2052,7 +2056,7 @@ st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n)
return 0;
}
-PUREFUNC(static st_index_t strcasehash(st_data_t));
+NO_SANITIZE("unsigned-integer-overflow", PUREFUNC(static st_index_t strcasehash(st_data_t)));
static st_index_t
strcasehash(st_data_t arg)
{