Bug 1443342 - Remove XorShift128PlusRNG.h from integer-overflow sanitizer blacklisting. r=froydnj
authorJeff Walden <jwalden@mit.edu>
Tue, 06 Mar 2018 09:33:52 -0800
changeset 461868 0ac335714eb84703979c29503305fd82c035eec0
parent 461867 f0a425ee1c3e01dec622b94a382bfda8844bfab6
child 461869 60164da23cf4f662718e5089acbe3ebbba80d882
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 - Remove XorShift128PlusRNG.h from integer-overflow sanitizer blacklisting. r=froydnj
build/sanitizers/ubsan_signed_overflow_blacklist.txt
build/sanitizers/ubsan_unsigned_overflow_blacklist.txt
mfbt/XorShift128PlusRNG.h
--- a/build/sanitizers/ubsan_signed_overflow_blacklist.txt
+++ b/build/sanitizers/ubsan_signed_overflow_blacklist.txt
@@ -236,17 +236,16 @@ 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
 src:*/nsprpub/lib/ds/plhash.c
 src:*/security/manager/ssl/md4.c
 src:*/security/nss/lib/dbm/src/h_func.c
 src:*/security/nss/lib/freebl/sha512.c
 src:*/security/nss/lib/freebl/md5.c
-src:*/XorShift128PlusRNG.h
 src:*/xpcom/ds/PLDHashTable.cpp
 
 # Hash/Cache function in Skia
 fun:*GradientShaderCache*Build32bitCache*
 
 # Hashing functions in Cairo
 fun:*_hash_matrix_fnv*
 fun:*_hash_mix_bits*
--- a/build/sanitizers/ubsan_unsigned_overflow_blacklist.txt
+++ b/build/sanitizers/ubsan_unsigned_overflow_blacklist.txt
@@ -243,17 +243,16 @@ 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
 src:*/nsprpub/lib/ds/plhash.c
 src:*/security/manager/ssl/md4.c
 src:*/security/nss/lib/dbm/src/h_func.c
 src:*/security/nss/lib/freebl/sha512.c
 src:*/security/nss/lib/freebl/md5.c
-src:*/XorShift128PlusRNG.h
 src:*/xpcom/ds/PLDHashTable.cpp
 
 # Hash/Cache function in Skia
 fun:*GradientShaderCache*Build32bitCache*
 
 # Hashing functions in Cairo
 fun:*_hash_matrix_fnv*
 fun:*_hash_mix_bits*
--- a/mfbt/XorShift128PlusRNG.h
+++ b/mfbt/XorShift128PlusRNG.h
@@ -56,16 +56,17 @@ class XorShift128PlusRNG {
    */
   XorShift128PlusRNG(uint64_t aInitial0, uint64_t aInitial1) {
     setState(aInitial0, aInitial1);
   }
 
   /**
    * Return a pseudo-random 64-bit number.
    */
+  MOZ_NO_SANITIZE_UNSIGNED_OVERFLOW
   uint64_t next() {
     /*
      * The offsetOfState*() methods below are provided so that exceedingly-rare
      * callers that want to observe or poke at RNG state in C++ type-system-
      * ignoring means can do so. Don't change the next() or nextDouble()
      * algorithms without altering code that uses offsetOfState*()!
      */
     uint64_t s1 = mState[0];