[PATCH] D102543: [Scudo] Make -fsanitize=scudo use standalone. Migrate tests.

Mitch Phillips via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 17 09:05:19 PDT 2021


hctim marked 2 inline comments as done.
hctim added a comment.

In D102543#2763749 <https://reviews.llvm.org/D102543#2763749>, @cryptoad wrote:

> I think one of the remaining things to address is the supported architectures:
>
>   set(ALL_SCUDO_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${PPC64})
>   set(ALL_SCUDO_STANDALONE_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64})
>
> I am unclear as to whether or not there are consumers for the missing ones, but if there are we might break -fsanitize=scudo for them.
> We have fallback for non-x86/arm processors in https://github.com/llvm/llvm-project/blob/e0921655b1ff8d4ba7c14be59252fe05b705920e/compiler-rt/lib/scudo/standalone/checksum.cpp#L79 , the rest looks fine so I think adding them should work.

Sure, I've added them but I don't have anything to test with. Well - I'm sure they'll let us know if they break.



================
Comment at: compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp:42
+      if (Allocator.canReturnNull()) {                                         \
+        errno = EINVAL;                                                        \
+        return nullptr;                                                        \
----------------
cryptoad wrote:
> I don't think errno carry over to  C++, there seems to be no sign of it in https://en.cppreference.com/w/cpp/memory/new/operator_new
Removed.


================
Comment at: compiler-rt/test/scudo/standalone/lit.cfg.py:21
 c_flags = ([config.target_cflags] +
-           ["-pthread",
-           "-fPIE",
-           "-pie",
-           "-O0",
-           "-UNDEBUG",
-           "-ldl",
-           "-Wl,--gc-sections"])
+           ["-pthread", "-fPIE", "-pie", "-O0", "-UNDEBUG", "-ldl",
+            "-Wl,--gc-sections"])
----------------
cryptoad wrote:
> -ldl might not be necessary anymore without the sanitizer dependencies?
Done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102543



More information about the cfe-commits mailing list