[PATCH] [RFC] Introduce support for multiple sanitizer blacklists (Clang side).

Peter Collingbourne peter at pcc.me.uk
Wed Jul 16 14:32:07 PDT 2014


Hi samsonov,

This adds support for multiple -fsanitize-blacklist flags, which cause
clang to load blacklists from each of the specified paths. This could be
useful for sanitizers such as DFSan where we may have multiple ABI lists,
each covering a specific library, which describes the ABI of that library.

This changes the semantics of the -fsanitize-blacklist flag, so I wanted to
make sure that we were comfortable with that. Now, the flag is additive, so a
-fsanitize-blacklist flag on the command line loads the specified blacklist
as well as the one in the resource directory. The -fno-sanitize-blacklist
flag works as before in that it prevents the blacklist in the resource
directory from being loaded, but it can also be used in combination with
-fsanitize-blacklist to load only user-specified blacklists.

Tests to come. I've removed the one test which fails as a result of the
changed semantics.

http://reviews.llvm.org/D4547

Files:
  include/clang/CodeGen/BackendUtil.h
  include/clang/Driver/SanitizerArgs.h
  include/clang/Frontend/CodeGenOptions.h
  lib/CodeGen/BackendUtil.cpp
  lib/CodeGen/CodeGenModule.cpp
  lib/CodeGen/SanitizerBlacklist.h
  lib/Driver/SanitizerArgs.cpp
  lib/Frontend/CompilerInvocation.cpp
  test/Driver/fsanitize-blacklist.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4547.11538.patch
Type: text/x-patch
Size: 10320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140716/775df190/attachment.bin>


More information about the cfe-commits mailing list