[libc-commits] [PATCH] D106919: [libc][wip] add integration tests for scudo in libc

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jul 27 15:31:14 PDT 2021


sivachandra added inline comments.


================
Comment at: libc/lib/CMakeLists.txt:7
 
+if(COMPILER_RT_BUILD_GWP_ASAN)
+  list(APPEND SCUDO_DEPS RTGwpAsan.${LIBC_TARGET_ARCHITECTURE} RTGwpAsanBacktraceLibc.${LIBC_TARGET_ARCHITECTURE} RTGwpAsanSegvHandler.${LIBC_TARGET_ARCHITECTURE})
----------------
hctim wrote:
> `COMPILER_RT_HAS_GWP_ASAN`
Should this be under `if(LLVM_LIBC_INCLUDE_SCUDO)`?


================
Comment at: libc/test/integration/CMakeLists.txt:2
+add_subdirectory(scudo)
\ No newline at end of file

----------------
Fix.


================
Comment at: libc/test/integration/scudo/CMakeLists.txt:10
+
+add_dependencies(libc-scudo-integration-test
+  llvmlibc
----------------
We don't need this as you have added a `target_link_libraries` call below to link to `llvmlibc`.


================
Comment at: libc/test/integration/scudo/CMakeLists.txt:17
+  PRIVATE
+  # TODO: Uncomment "-nolibc" once llvm-libc is complete enough to run scudo.
+  # "-nolibc"
----------------
Remove this?


================
Comment at: libc/test/integration/scudo/CMakeLists.txt:26
+)
\ No newline at end of file

----------------
Fix.


================
Comment at: libc/test/integration/scudo/integration_test.cpp:12
+int main() {
+  void *P = malloc(100);
+  if (P == nullptr) {
----------------
Add calls to all allocator related libc functions? For example, follow `malloc` with `free` and do the same with `realloc`, `calloc` and `aligned_alloc`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106919



More information about the libc-commits mailing list