Skip to content
Snippets Groups Projects
Commit 39dc0169 authored by Dmitry Vyukov's avatar Dmitry Vyukov
Browse files

tsan: update docs

update docs for no_sanitize_thread attribute and blacklist



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192872 91177308-0d34-0410-b5e6-96231b3b80d8
parent 251b18d7
No related branches found
No related tags found
No related merge requests found
...@@ -1937,8 +1937,8 @@ with :doc:`ThreadSanitizer`. ...@@ -1937,8 +1937,8 @@ with :doc:`ThreadSanitizer`.
Use ``__attribute__((no_sanitize_thread))`` on a function declaration Use ``__attribute__((no_sanitize_thread))`` on a function declaration
to specify that checks for data races on plain (non-atomic) memory accesses to specify that checks for data races on plain (non-atomic) memory accesses
should not be inserted by ThreadSanitizer. should not be inserted by ThreadSanitizer.
The function may still be instrumented by the tool The function is still instrumented by the tool to avoid false positives and
to avoid false positives in other places. provide meaningful stack traces.
.. _langext-memory_sanitizer: .. _langext-memory_sanitizer:
......
...@@ -91,7 +91,8 @@ Some code should not be instrumented by ThreadSanitizer. ...@@ -91,7 +91,8 @@ Some code should not be instrumented by ThreadSanitizer.
One may use the function attribute One may use the function attribute
:ref:`no_sanitize_thread <langext-thread_sanitizer>` :ref:`no_sanitize_thread <langext-thread_sanitizer>`
to disable instrumentation of plain (non-atomic) loads/stores in a particular function. to disable instrumentation of plain (non-atomic) loads/stores in a particular function.
ThreadSanitizer may still instrument such functions to avoid false positives. ThreadSanitizer still instruments such functions to avoid false positives and
provide meaningful stack traces.
This attribute may not be This attribute may not be
supported by other compilers, so we suggest to use it together with supported by other compilers, so we suggest to use it together with
``__has_feature(thread_sanitizer)``. ``__has_feature(thread_sanitizer)``.
...@@ -101,7 +102,10 @@ Blacklist ...@@ -101,7 +102,10 @@ Blacklist
ThreadSanitizer supports ``src`` and ``fun`` entity types in ThreadSanitizer supports ``src`` and ``fun`` entity types in
:doc:`SanitizerSpecialCaseList`, that can be used to suppress data race reports in :doc:`SanitizerSpecialCaseList`, that can be used to suppress data race reports in
the specified source files or functions. the specified source files or functions. Unlike functions marked with
:ref:`no_sanitize_thread <langext-thread_sanitizer>` attribute,
blacklisted functions are not instrumented at all. This can lead to false positives
due to missed synchronization via atomic operations and missed stack frames in reports.
Limitations Limitations
----------- -----------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment