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

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 10:49:33 PST 2017


cryptoad marked an inline comment as done.
cryptoad added inline comments.


================
Comment at: lib/scudo/scudo_utils.cpp:105
+bool testCPUFeature(CPUFeature Feature) {
+  static uptr HWCap = getauxval(AT_HWCAP);
+
----------------
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.



https://reviews.llvm.org/D28574





More information about the llvm-commits mailing list