[PATCH] D63612: [scudo][standalone] Introduce the C & C++ wrappers

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 11:17:18 PDT 2019


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


================
Comment at: lib/scudo/standalone/tests/wrappers_c_test.cc:78
+  if (SCUDO_ANDROID)
+    EXPECT_EQ(errno, ENOMEM);
+}
----------------
Why do we only check errno on Android?  If calloc returns nullptr, I'd expect errno to be set.


================
Comment at: lib/scudo/standalone/tests/wrappers_c_test.cc:104
+
+  // Android's memalign accepts non power-of-2 alignments, and 0.
+  if (SCUDO_ANDROID) {
----------------
Just curious -- why?


================
Comment at: lib/scudo/standalone/tests/wrappers_cpp_test.cc:69
+  testCxxNew<double>();
+  testCxxNew<long double>();
+}
----------------
Maybe test a class type as well?


================
Comment at: lib/scudo/standalone/wrappers.inc:1
+//===-- wrappers.inc --------------------------------------------*- C++ -*-===//
+//
----------------
Should this be `wrappers_c.inc`?


Repository:
  rCRT Compiler Runtime

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

https://reviews.llvm.org/D63612





More information about the llvm-commits mailing list