aboutsummaryrefslogtreecommitdiffstats
path: root/siphash.h
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-07 04:09:05 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-07 04:09:05 +0000
commit234ffbce0e17464b0c174e3567ffe34917277229 (patch)
tree2cca7ecd4720a332a32520c7d92a07cb8c071398 /siphash.h
parentc818b2fcf4652869799057556fc528e02288e248 (diff)
downloadruby-234ffbce0e17464b0c174e3567ffe34917277229.tar.gz
blacklist UBSAN's unsigned integer overflow
Integer overflow for unsigned types are fully defined in C. They are not always problematic (but not always OK). These functions in this changeset intentionally utilizes that behaviour. Blacklist from UBSAN checks for better output. See also: https://travis-ci.org/ruby/ruby/jobs/451624829 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'siphash.h')
-rw-r--r--siphash.h2
1 files changed, 1 insertions, 1 deletions
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