[PATCH] D35221: [scudo] PRNG makeover
    Kostya Kortchinsky via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jul 10 18:51:26 PDT 2017
    
    
  
cryptoad added inline comments.
================
Comment at: lib/scudo/scudo_allocator.cpp:583
     initThreadMaybe();
-    if (CheckForCallocOverflow(NMemB, Size))
+    if (UNLIKELY(CheckForCallocOverflow(NMemB, Size)))
       return FailureHandler::OnBadRequest();
----------------
alekseyshl wrote:
> This change is unrelated, please revert.
Ack. Slipped in from another one sorry.
================
Comment at: lib/scudo/scudo_utils.h:84
+    // size of the random data left in the cache.
+    CachedBytes = next() | (1ULL << 63);
+  }
----------------
alekseyshl wrote:
> Does this trick really help with performance?
The numbers do not differ enough to go one way or the other, but the u8 was taking up to extra 8bytes depending on architecture. It feels it should be faster, but it definitely save space.
https://reviews.llvm.org/D35221
    
    
More information about the llvm-commits
mailing list