Go to file
Alexey Samsonov 1444bb9fc8 SanitizerBlacklist: blacklist functions by their source location.
This commit changes the way we blacklist functions in ASan, TSan,
MSan and UBSan. We used to treat function as "blacklisted"
and turned off instrumentation in it in two cases:

1) Function is explicitly blacklisted by its mangled name.
This part is not changed.

2) Function is located in llvm::Module, whose identifier is
contained in the list of blacklisted sources. This is completely
wrong, as llvm::Module may not correspond to the actual source
file function is defined in. Also, function can be defined in
a header, in which case user had to blacklist the .cpp file
this header was #include'd into, not the header itself.
Such functions could cause other problems - for instance, if the
header was included in multiple source files, compiled
separately and linked into a single executable, we could end up
with both instrumented and non-instrumented version of the same
function participating in the same link.

After this change we will make blacklisting decision based on
the SourceLocation of a function definition. If a function is
not explicitly defined in the source file, (for example, the
function is compiler-generated and responsible for
initialization/destruction of a global variable), then it will
be blacklisted if the corresponding global variable is defined
in blacklisted source file, and will be instrumented otherwise.

After this commit, the active users of blacklist files may have
to revisit them. This is a backwards-incompatible change, but
I don't think it's possible or makes sense to support the
old incorrect behavior.

I plan to make similar change for blacklisting GlobalVariables
(which is ASan-specific).

llvm-svn: 219997
2014-10-17 00:20:19 +00:00
clang SanitizerBlacklist: blacklist functions by their source location. 2014-10-17 00:20:19 +00:00
clang-tools-extra [clang-tidy] Minor fixes for the NamespaceCommentCheck. 2014-10-16 15:11:54 +00:00
compiler-rt [asan] make sure coverage is dumped even if leaks are reported 2014-10-16 18:59:07 +00:00
debuginfo-tests Always compile debuginfo-tests for the host triple 2014-10-16 23:43:34 +00:00
libclc r600: Use llvm intrinsic to read work dimension information 2014-10-15 15:08:06 +00:00
libcxx [libcxx] Add support for LLVM_USE_SANITIZER=Undefined 2014-10-16 23:21:59 +00:00
libcxxabi Correctly export _Unwind_[GS]et(GR|IP) for EHABI. 2014-10-13 21:01:30 +00:00
lld [mach-o] Fix crash when -all_load used with dylibs 2014-10-16 23:42:42 +00:00
lldb Attach a bug number to these failures 2014-10-16 23:17:46 +00:00
llvm Add our own copy of the find_executable function to cope with installations 2014-10-16 23:43:20 +00:00
openmp I apologise in advance for the size of this check-in. At Intel we do 2014-10-07 16:25:50 +00:00
polly [Refactor][NfC] ReportLevel should be used as a bool not an int 2014-10-15 23:24:28 +00:00