[PATCH] D38244: [scudo] Scudo thread specific data refactor, part 3

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 14:12:03 PDT 2017


alekseyshl accepted this revision.
alekseyshl added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/scudo/scudo_platform.h:20
+#if !SANITIZER_LINUX && !SANITIZER_FUCHSIA
+# error "The Scudo hardened allocator is currently not supported this platform."
+#endif
----------------
... on this platform.


================
Comment at: lib/scudo/scudo_platform.h:31
+# define SCUDO_TSD_EXCLUSIVE 1
+#endif  // SANITIZER_LINUX && !SANITIZER_ANDROID
+
----------------
Maybe

  #if SANITIZER_ANDROID || SANITIZER_FUCHSIA
    ...
  #elif SANITIZER_LINUX && !SANITIZER_ANDROID
    ...
  #else
    error
  #endif

would be a bit more robust?


================
Comment at: lib/scudo/scudo_tsd.h:58
  private:
   bool UnlockRequired;
   StaticSpinMutex Mutex;
----------------
const bool UnlockRequired;


================
Comment at: lib/scudo/scudo_tsd.h:65
 
 // Platform specific fastpath functions definitions.
+#include "scudo_tsd_exclusive.inc"
----------------
Fix the comment, they are not platform specific anymore.


https://reviews.llvm.org/D38244





More information about the llvm-commits mailing list