[PATCH] D63231: [scudo][standalone] Introduce the combined allocator

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 13:19:09 PDT 2019


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


================
Comment at: lib/scudo/standalone/allocator.h:1
+//===-- allocator.h ---------------------------------------------*- C++ -*-===//
+//
----------------
Why call this file allocator.h?  allocator_config.h seems more accurate.


================
Comment at: lib/scudo/standalone/combined.h:114
+
+    if (UNLIKELY(!getRandom(reinterpret_cast<void *>(&Cookie), sizeof(Cookie))))
+      Cookie = static_cast<u32>(getMonotonicTime() ^
----------------
Is this reinterpret_cast required?


================
Comment at: lib/scudo/standalone/tests/combined_test.cc:73
+  bool Found = false;
+  for (scudo::uptr I = 0; I < 1024U && !Found; I++) {
+    void *P = Allocator->allocate(NeedleSize, Origin);
----------------
Is this test flaky at all?


================
Comment at: lib/scudo/standalone/tests/combined_test.cc:133
+  UseQuarantine = false;
+  testAllocator<scudo::AndroidSvelteConfig>();
+}
----------------
What about FuchsiaConfig?


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63231/new/

https://reviews.llvm.org/D63231





More information about the llvm-commits mailing list