Bug 1443342 - Opt one HashFunctions.h function out of integer-overflow sanitizing and don't blacklist HashFunctions.h. r=froydnj
authorJeff Walden <jwalden@mit.edu>
Thu, 01 Mar 2018 17:11:33 -0800
changeset 461866 6c03114535c2f46772920fec5ac13f724537500d
parent 461865 9581711718570bc55ce69f4eb397f462ab0a639e
child 461867 f0a425ee1c3e01dec622b94a382bfda8844bfab6
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1443342
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1443342 - Opt one HashFunctions.h function out of integer-overflow sanitizing and don't blacklist HashFunctions.h. r=froydnj
build/sanitizers/ubsan_signed_overflow_blacklist.txt
build/sanitizers/ubsan_unsigned_overflow_blacklist.txt
mfbt/HashFunctions.h
--- a/build/sanitizers/ubsan_signed_overflow_blacklist.txt
+++ b/build/sanitizers/ubsan_signed_overflow_blacklist.txt
@@ -223,17 +223,16 @@ fun:*ClockResolutionNs*
 # overflow and underflow checking, triggering frequent reports
 src:*/mozglue/misc/TimeStamp.h
 
 #
 # Various hashing functions, both regular and cryptographic ones
 #
 src:*/dom/canvas/MurmurHash3.cpp
 src:*/gfx/skia/skia/include/private/SkChecksum.h
-src:*/HashFunctions.h
 src:*/intl/icu/source/common/unifiedcache.h
 src:*/mfbt/SHA1.cpp
 src:*/modules/zlib/src/adler32.c
 src:*/netwerk/cache/nsDiskCacheDevice.cpp
 src:*/netwerk/cache2/CacheHashUtils.cpp
 src:*/netwerk/sctp/src/netinet/sctp_sha1.c
 src:*/netwerk/srtp/src/crypto/hash/sha1.c
 src:*/netwerk/sctp/src/netinet/sctp_sha1.c
--- a/build/sanitizers/ubsan_unsigned_overflow_blacklist.txt
+++ b/build/sanitizers/ubsan_unsigned_overflow_blacklist.txt
@@ -230,17 +230,16 @@ fun:*ClockResolutionNs*
 # overflow and underflow checking, triggering frequent reports
 src:*/mozglue/misc/TimeStamp.h
 
 #
 # Various hashing functions, both regular and cryptographic ones
 #
 src:*/dom/canvas/MurmurHash3.cpp
 src:*/gfx/skia/skia/include/private/SkChecksum.h
-src:*/HashFunctions.h
 src:*/intl/icu/source/common/unifiedcache.h
 src:*/mfbt/SHA1.cpp
 src:*/modules/zlib/src/adler32.c
 src:*/netwerk/cache/nsDiskCacheDevice.cpp
 src:*/netwerk/cache2/CacheHashUtils.cpp
 src:*/netwerk/sctp/src/netinet/sctp_sha1.c
 src:*/netwerk/srtp/src/crypto/hash/sha1.c
 src:*/netwerk/sctp/src/netinet/sctp_sha1.c
--- a/mfbt/HashFunctions.h
+++ b/mfbt/HashFunctions.h
@@ -347,16 +347,17 @@ private:
 
       // 3. Finalization.
       mV2 ^= 0xff;
       for (int i = 0; i < 3; i++)
         sipRound();
       return mV0 ^ mV1 ^ mV2 ^ mV3;
     }
 
+    MOZ_NO_SANITIZE_UNSIGNED_OVERFLOW
     void sipRound()
     {
       mV0 += mV1;
       mV1 = RotateLeft(mV1, 13);
       mV1 ^= mV0;
       mV0 = RotateLeft(mV0, 32);
       mV2 += mV3;
       mV3 = RotateLeft(mV3, 16);