[cfe-dev] clang attributes to disable asan/tsan/msan
kcc at google.com
Mon Feb 18 05:31:24 PST 2013
Clang has two attributes to disable bug detection tools in a given
__attribute__((no_thread_safety_analysis)) disables clang's *static*
thread-safety analysis. (
__attribute__((no_address_safety_analysis)) disables AddressSanitizer
Now we need two more attributes to disable
and MemorySanitizer (http://clang.llvm.org/docs/MemorySanitizer.html)
For MemorySanitizer I propose __attribute__((no_uninitialized_checks))
Objections? Better naming suggestion?
(We deliberately named no-asan attribute "no_address_safety_analysis" w/o
in the name to make this attribute usable for other tools, e.g. SAFECode.
we may not want to tie the no-msan attribute to msan)
For ThreadSanitizer the question is a bit trickier.
We can reuse __attribute__((no_thread_safety_analysis)) which makes sense
because it already means a similar thing.
OTOH, most of the current uses of no_thread_safety_analysis I know about
are there because of the limitations of clang's static analysis.
And we don't need to disable ThreadSanitizer for the majority of those
which means we may better use another attribute to disable ThreadSanitizer
How to name it?
The patch discussion: http://llvm-reviews.chandlerc.com/D390
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev