vlad.tsyrklevich added inline comments.

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


================
Comment at: lib/CodeGen/CGDeclCXX.cpp:322
+  if (getLangOpts().Sanitize.hasOneOf(ASanMask))
+    if (!isInSanitizerBlacklist(ASanMask, Fn, Loc))
       Fn->addFnAttr(llvm::Attribute::SanitizeAddress);
----------------
This use of ASanMask could also confound address & kernel-address as @eugenis 
pointed out.


================
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;
----------------
eugenis wrote:
> would this blacklist [address] when compiling for kernel-address, and vice 
> versa?
Yes, it would. We should pass the actual sanitizer option mask ANDed with the 
ASanMask here. Thanks!


https://reviews.llvm.org/D37925



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to