[PATCH] D31947: [scudo] Android support groundwork
    Kostya Kortchinsky via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Apr 17 13:37:08 PDT 2017
    
    
  
cryptoad marked an inline comment as done.
cryptoad added inline comments.
================
Comment at: lib/scudo/scudo_allocator.cpp:317
+                 bool ForceZeroContents = false) {
+    initThreadMaybe();
+    if (UNLIKELY(!IsPowerOfTwo(Alignment))) {
----------------
eugenis wrote:
> Calling initThreadMaybe() from all entry points looks error-prone. Is it ok (performance-wise) to do lazy initialization in getCurrentThreadContext?
Things like BackendAllocator.ReturnNullOrDieOnBadRequest will require initialization, but are called prior to getCurrentThreadContext.
I am also actually not super happy about the way this turned out. The alternative would be a preinit or equivalent?
================
Comment at: lib/scudo/scudo_thread.h:10
+///
+/// TODO(kostyak): description.
+///
----------------
eugenis wrote:
> an actual description would be nice
Sorry, user failure. I will address that.
https://reviews.llvm.org/D31947
    
    
More information about the llvm-commits
mailing list