[PATCH] D86694: [scudo] Allow -fsanitize=scudo on Linux and Windows (WIP, don't land as is)

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 13:27:52 PDT 2020


aganea added a comment.

I'm also in favor, I think this is good direction ahead. It'd be nice if following issues were fixed -- in subsequent patches if you wish:

- Stage1 `ninja check-scudo` fails many tests for me, see F13037612: errors.txt <https://reviews.llvm.org/F13037612>.
- Stage2 `ninja check-llvm` fails after a while on high-core machines (4TB issue mentionned in comments above). Lowering `AllocatorSize` to 256GB would fix the issue on the short-term.
- Fix & test the "exclusive" mode (or just skip to scudo-standalone if it's too complicated).



================
Comment at: compiler-rt/lib/scudo/scudo_platform.h:67
 #if SANITIZER_CAN_USE_ALLOCATOR64
 # if defined(__aarch64__) && SANITIZER_ANDROID
 const uptr AllocatorSize = 0x4000000000ULL;  // 256G.
----------------
`&& SANITIZER_WINDOWS` ?


================
Comment at: compiler-rt/test/scudo/lit.cfg.py:19
 # C & CXX flags.
 c_flags = ([config.target_cflags] +
+c_flags = ([config.target_cflags] +
----------------
Remove this line (duplicate).


================
Comment at: llvm/lib/Support/CMakeLists.txt:76
   if(NOT EXISTS "${LLVM_INTEGRATED_CRT_ALLOC}")
-    message(FATAL_ERROR "Cannot find the path to `git clone` for the CRT allocator! (${LLVM_INTEGRATED_CRT_ALLOC}). Currently, rpmalloc, snmalloc and mimalloc are supported.")
+    message(FATAL_ERROR "Cannot find the path to `git clone` for the CRT allocator! (${LLVM_INTEGRATED_CRT_ALLOC}). Currently, rpmalloc, snmalloc, mimalloc and scudo are supported.")
   endif()
----------------
Please also mention scudo in corresponding `LLVM_INTEGRATED_CRT_ALLOC` section in `llvm/docs/CMake.rst`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86694



More information about the llvm-commits mailing list