[PATCH] D37925: Allow specifying sanitizers in blacklists

Evgenii Stepanov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 15 16:51:06 PDT 2017


eugenis added inline comments.


================
Comment at: include/clang/Basic/SanitizerSpecialCaseList.h:33
+
+  bool inSection(SanitizerMask Mask, StringRef Prefix, StringRef Query,
+                 StringRef Category = StringRef()) const;
----------------
Please add  a comment on the meaning of Mask. I assume it's any-of?


================
Comment at: lib/CodeGen/CodeGenModule.cpp:1569
   const auto &SanitizerBL = getContext().getSanitizerBlacklist();
-  if (SanitizerBL.isBlacklistedGlobal(GV->getName(), Category))
+  if (SanitizerBL.isBlacklistedGlobal(ASanMask, GV->getName(), Category))
     return true;
----------------
would this blacklist [address] when compiling for kernel-address, and vice versa?


================
Comment at: test/CodeGen/sanitizer-special-case-list.c:4
+// RUN: echo "fun:*cfi*" > %t.unsanitized1
+// RUN: echo "fun:*overflow*" >> %t.unsanitized1
+// RUN: %clang_cc1 -fsanitize=unsigned-integer-overflow,cfi-icall -fsanitize-blacklist=%t.unsanitized1 -emit-llvm %s -o - | FileCheck %s --check-prefix=UNSANITIZED
----------------
it is common to add such files as actual files under Inputs/


https://reviews.llvm.org/D37925





More information about the cfe-commits mailing list