Backed out changeset 74459407359a (bug 917593) for Windows debug checktest asserts.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 24 Sep 2013 16:20:15 -0400
changeset 148479 1f690939a3a5f6e44ab18dda8c0fb81962851f1f
parent 148478 a75639eeca262675abb5dce43f98bc0bae61119b
child 148480 b340b241e433e2e478c37c90d9196ce34331b8bd
push id25343
push userkwierso@gmail.com
push dateWed, 25 Sep 2013 02:43:37 +0000
treeherdermozilla-central@ce5bc913350a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs917593
milestone27.0a1
backs out74459407359ac077b1290fc66c96c71a91ea43d9
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
Backed out changeset 74459407359a (bug 917593) for Windows debug checktest asserts.
mfbt/Endian.h
mfbt/tests/TestEndian.cpp
--- a/mfbt/Endian.h
+++ b/mfbt/Endian.h
@@ -233,19 +233,19 @@ class EndianUtils
     /**
      * Assert that the memory regions [dest, dest+count) and [src, src+count]
      * do not overlap.  count is given in bytes.
      */
     static void assertNoOverlap(const void* dest, const void* src, size_t count)
     {
       DebugOnly<const uint8_t*> byteDestPtr = static_cast<const uint8_t*>(dest);
       DebugOnly<const uint8_t*> byteSrcPtr = static_cast<const uint8_t*>(src);
-      MOZ_ASSERT((byteDestPtr <= byteSrcPtr &&
+      MOZ_ASSERT((byteDestPtr < byteSrcPtr &&
                   byteDestPtr + count <= byteSrcPtr) ||
-                 (byteSrcPtr <= byteDestPtr &&
+                 (byteSrcPtr < byteDestPtr &&
                   byteSrcPtr + count <= byteDestPtr));
     }
 
     template<typename T>
     static void assertAligned(T* ptr)
     {
       MOZ_ASSERT((uintptr_t(ptr) % sizeof(T)) == 0, "Unaligned pointer!");
     }
--- a/mfbt/tests/TestEndian.cpp
+++ b/mfbt/tests/TestEndian.cpp
@@ -391,15 +391,10 @@ main()
 
   TestBulkInPlaceNoSwap(uint16_values);
   TestBulkInPlaceNoSwap(int16_values);
   TestBulkInPlaceNoSwap(uint32_values);
   TestBulkInPlaceNoSwap(int32_values);
   TestBulkInPlaceNoSwap(uint64_values);
   TestBulkInPlaceNoSwap(int64_values);
 
-  // Make sure we don't incorrectly cry overlap for zero-length buffers.
-  uint64_t scratch = 0xdeadbeef;
-  NativeEndian::copyAndSwapFromLittleEndian(&scratch, &scratch, 0);
-  MOZ_ASSERT(scratch == 0xdeadbeef);
-
   return 0;
 }