[PATCH] D28574: [scudo] Refactor of CRC32 and ARM runtime CRC32 detection

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 10:54:39 PST 2017


rengolin added a comment.

Did you test this on AArch32 and AArch64?



================
Comment at: lib/scudo/scudo_utils.cpp:105
+bool testCPUFeature(CPUFeature Feature) {
+  static uptr HWCap = getauxval(AT_HWCAP);
+
----------------
cryptoad wrote:
> rengolin wrote:
> > This only works on Linux, right?
> Correct. This is ensured in config-ix.cmake:
> 
> ```
> if (COMPILER_RT_HAS_SANITIZER_COMMON AND SCUDO_SUPPORTED_ARCH AND
>     OS_NAME MATCHES "Linux")
>   set(COMPILER_RT_HAS_SCUDO TRUE)
> else()
>   set(COMPILER_RT_HAS_SCUDO FALSE)
> endif()
> ```
> I can add a check for SANITIZER_LINUX being defined in the top header if you feel it makes things clearer.
> 
Probably a good idea, if anyone ever updates the CMake file. :)


https://reviews.llvm.org/D28574





More information about the llvm-commits mailing list