[PATCH] D42928: [sanitizer] Revert rL324263
    Kostya Kortchinsky via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Feb  5 12:19:31 PST 2018
    
    
  
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT324268: [sanitizer] Revert rL324263 (authored by cryptoad, committed by ).
Changed prior to commit:
  https://reviews.llvm.org/D42928?vs=132877&id=132879#toc
Repository:
  rCRT Compiler Runtime
https://reviews.llvm.org/D42928
Files:
  lib/sanitizer_common/sanitizer_allocator_size_class_map.h
Index: lib/sanitizer_common/sanitizer_allocator_size_class_map.h
===================================================================
--- lib/sanitizer_common/sanitizer_allocator_size_class_map.h
+++ lib/sanitizer_common/sanitizer_allocator_size_class_map.h
@@ -163,7 +163,7 @@
       return (size + kMinSize - 1) >> kMinSizeLog;
     uptr l = MostSignificantSetBitIndex(size);
     uptr hbits = (size >> (l - S)) & M;
-    uptr lbits = size & ((1U << (l - S)) - 1);
+    uptr lbits = size & ((1 << (l - S)) - 1);
     uptr l1 = l - kMidSizeLog;
     return kMidClass + (l1 << S) + hbits + (lbits > 0);
   }
@@ -176,8 +176,7 @@
       return 16;
     if (UNLIKELY(class_id == 0))
       return 0;
-    const uptr n =
-        (1U << kMaxBytesCachedLog) / static_cast<u32>(Size(class_id));
+    uptr n = (1UL << kMaxBytesCachedLog) / Size(class_id);
     return Max<uptr>(1, Min(kMaxNumCachedHint, n));
   }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42928.132879.patch
Type: text/x-patch
Size: 908 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180205/7e0effe3/attachment.bin>
    
    
More information about the llvm-commits
mailing list