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

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 16:21:39 PDT 2020


cryptoad added a comment.

Thank you for all your work!
IIRC everything was working except as you point out some of the very Unixy tests.
Is your build creating a `clang_rt.scudo_cxx` library that also needs to be link as well? The C++ specific interceptors usually end up in a separate library that is not linked into the straight C programs, which is the most likely culprit for not having new/delete be intercepted.

In D86694#2360026 <https://reviews.llvm.org/D86694#2360026>, @russell.gallop wrote:

> These are all down to new/delete not being replaced by the scudo versions, so scudoAllocate and scudoDeallocate don't get the appropriate size and Type parameters. The cxx library should be linked by SanitizerArgs::addArgs so I'm not sure why this is. @cryptoad, it looks like you did some work in scudo_new_delete.cpp, did you have this working?
>
> Does new/delete need to work for this, or should I mark these tests as unsupported on Windows for the purposes of a step towards getting the standalone scudo working?
>
> Stage 2 builds with -DLLVM_INTEGRATED_CRT_ALLOC=<llvm-project>/stage1/lib/clang/12.0.0/lib/windows/clang_rt.scudo-x86_64.lib -DLLVM_USE_CRT_RELEASE=MT.




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