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

Mitch Phillips via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jul 28 08:45:16 PDT 2021


hctim 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})
----------------
sivachandra wrote:
> michaelrj wrote:
> > sivachandra wrote:
> > > hctim wrote:
> > > > `COMPILER_RT_HAS_GWP_ASAN`
> > > Should this be under `if(LLVM_LIBC_INCLUDE_SCUDO)`?
> > I can't make this COMPILER_RT_HAS_GWP_ASAN since that variable won't be defined yet because the llvm libc cmake code runs before the compiler-rt cmake code does.
> > 
> > If this was under `if(LLVM_LIBC_INCLUDE_SCUDO)` then you couldn't include GWP-ASan without also including SCUDO, and I figured it was better to give the user the option.
> Is GWP-ASan useful without something like SCUDO calling into it?
That seems weird that libc's full cmake runs before compiler-rt's config-ix.

I think you might run into a problem where you want GWP-ASan, but GWP-ASan isn't supported on your architecture (like mips). In these cases `COMPILER_RT_BUILD_GWP_ASAN == True` but `COMPILER_RT_HAS_GWP_ASAN == False`.

> Is GWP-ASan useful without something like SCUDO calling into it?

Nope, GWP-ASan needs be called from malloc().


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