[libcxx-commits] [PATCH] D127608: [CMake][libcxx] Support HWASan
Petr Hosek via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 13 11:52:44 PDT 2022
phosek updated this revision to Diff 436499.
Herald added a subscriber: arichardson.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127608/new/
https://reviews.llvm.org/D127608
Files:
libcxx/CMakeLists.txt
libcxx/utils/libcxx/test/params.py
Index: libcxx/utils/libcxx/test/params.py
===================================================================
--- libcxx/utils/libcxx/test/params.py
+++ libcxx/utils/libcxx/test/params.py
@@ -136,6 +136,8 @@
AddFlag('-fsanitize=address') if sanitizer == 'Address' else None,
AddFeature('asan') if sanitizer == 'Address' else None,
+ AddFlag('-fsanitize=hwaddress') if sanitizer == 'HWAddress' else None,
+ AddFeature('hwasan') if sanitizer == 'HWAddress' else None,
AddFlag('-fsanitize=memory') if sanitizer in ['Memory', 'MemoryWithOrigins'] else None,
AddFeature('msan') if sanitizer in ['Memory', 'MemoryWithOrigins'] else None,
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -704,6 +704,8 @@
endif()
if (USE_SANITIZER STREQUAL "Address")
append_flags(SANITIZER_FLAGS "-fsanitize=address")
+ elseif (USE_SANITIZER STREQUAL "HWAddress")
+ append_flags(SANITIZER_FLAGS "-fsanitize=hwaddress")
elseif (USE_SANITIZER MATCHES "Memory(WithOrigins)?")
append_flags(SANITIZER_FLAGS -fsanitize=memory)
if (USE_SANITIZER STREQUAL "MemoryWithOrigins")
@@ -714,6 +716,9 @@
elseif (USE_SANITIZER STREQUAL "Address;Undefined" OR
USE_SANITIZER STREQUAL "Undefined;Address")
append_flags(SANITIZER_FLAGS "-fsanitize=address,undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all")
+ elseif (USE_SANITIZER STREQUAL "HWAddress;Undefined" OR
+ USE_SANITIZER STREQUAL "Undefined;HWAddress")
+ append_flags(SANITIZER_FLAGS "-fsanitize=hwaddress,undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all")
elseif (USE_SANITIZER STREQUAL "Thread")
append_flags(SANITIZER_FLAGS -fsanitize=thread)
elseif (USE_SANITIZER STREQUAL "DataFlow")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127608.436499.patch
Type: text/x-patch
Size: 1994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220613/20d5e80d/attachment-0001.bin>
More information about the libcxx-commits
mailing list