[PATCH] D96203: [clang][patch] Modify sanitizer options names: renaming blacklist to blocklist

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 6 07:32:33 PST 2021


aaron.ballman added a comment.

Thank you for working on this!

> This changes the option names that include substring blacklist to blocklist.

I think this change works in some places, but in other places we say things like "blocklisted" which feels a bit awkward. I don't super love the name `blocklist`, but I don't super hate it either. All the alternative names I come up with aren't really great either, like `UnsanitiziedEntities` or `IgnoredObjects`. Maybe someone will have a better idea here than me, but I do think the current name is an improvement over the old name.

> In options.td there is a way to officially mark an option deprecated by adding it to a specific group, I didn't do that yet. When could we actually eliminate the old spelling? How about December 2021?

I think we want to leave the deprecated options in for a full release cycle, so I'd say that (assuming this lands in Clang 13) we could remove support once we start work on Clang 14.

> I thought it would be best to start with the external clang interface, but i also want to make more patches to eliminate whitelist and blacklist in the comments and in the object names, file names etc.

Fantastic, thank you!



================
Comment at: clang/include/clang/AST/ASTContext.h:565
 
   /// Blacklist object that is used by sanitizers to decide which
   /// entities should not be instrumented.
----------------
The comment should be updated as well.


================
Comment at: clang/lib/Driver/SanitizerArgs.cpp:141
     SanitizerMask Mask;
-  } Blacklists[] = {{"asan_blacklist.txt", SanitizerKind::Address},
-                    {"hwasan_blacklist.txt", SanitizerKind::HWAddress},
-                    {"memtag_blacklist.txt", SanitizerKind::MemTag},
-                    {"msan_blacklist.txt", SanitizerKind::Memory},
-                    {"tsan_blacklist.txt", SanitizerKind::Thread},
+  } Blacklists[] = {{"asan_blocklist.txt", SanitizerKind::Address},
+                    {"hwasan_blocklist.txt", SanitizerKind::HWAddress},
----------------
Do we want to retain support for the old file names and warn about using a deprecated name if one is used? This would keep folks working who are relying on this (even if it's undocumented).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96203/new/

https://reviews.llvm.org/D96203



More information about the cfe-commits mailing list