[PATCH] D35849: [UBSan] Provide default blacklist filename for UBSan

Han Shen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 11:27:40 PDT 2017


shenhan created this revision.

This is to provide a default blacklist filename for UBSan.

While UBSan is turned on, it's better that clang pick up a blacklist file (when exists), just as what ASan / MSan does, so we do not end up adding the "-fsanitize-blacklist" option to every command line.


https://reviews.llvm.org/D35849

Files:
  lib/Driver/SanitizerArgs.cpp


Index: lib/Driver/SanitizerArgs.cpp
===================================================================
--- lib/Driver/SanitizerArgs.cpp
+++ lib/Driver/SanitizerArgs.cpp
@@ -100,6 +100,8 @@
     BlacklistFile = "dfsan_abilist.txt";
   else if (Kinds & CFI)
     BlacklistFile = "cfi_blacklist.txt";
+  else if (Kinds & Undefined)
+    BlacklistFile = "ubsan_blacklist.txt";
 
   if (BlacklistFile) {
     clang::SmallString<64> Path(D.ResourceDir);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35849.108118.patch
Type: text/x-patch
Size: 449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170725/3a0f8b93/attachment.bin>


More information about the cfe-commits mailing list