llvm-project/clang/docs
Marco Elver 280333021e [SanitizeCoverage] Add support for NoSanitizeCoverage function attribute
We really ought to support no_sanitize("coverage") in line with other
sanitizers. This came up again in discussions on the Linux-kernel
mailing lists, because we currently do workarounds using objtool to
remove coverage instrumentation. Since that support is only on x86, to
continue support coverage instrumentation on other architectures, we
must support selectively disabling coverage instrumentation via function
attributes.

Unfortunately, for SanitizeCoverage, it has not been implemented as a
sanitizer via fsanitize= and associated options in Sanitizers.def, but
rolls its own option fsanitize-coverage. This meant that we never got
"automatic" no_sanitize attribute support.

Implement no_sanitize attribute support by special-casing the string
"coverage" in the NoSanitizeAttr implementation. To keep the feature as
unintrusive to existing IR generation as possible, define a new negative
function attribute NoSanitizeCoverage to propagate the information
through to the instrumentation pass.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=49035

Reviewed By: vitalybuka, morehouse

Differential Revision: https://reviews.llvm.org/D102772
2021-05-25 12:57:14 +02:00
..
CommandGuide [clang][docs] Fix documentation of -O 2020-09-17 13:44:01 +01:00
analyzer [analyzer] DynamicSize: Debug facility 2021-04-05 19:17:52 +02:00
tools [ASTMatchers] Make Param functors variadic 2021-03-03 11:41:20 +00:00
APINotes.rst docs: add documentation describing API Notes 2020-10-05 18:29:13 +00:00
AddressSanitizer.rst [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
AutomaticReferenceCounting.rst [clang] Fix typos in documentation (NFC) 2021-03-06 15:52:52 -08:00
Block-ABI-Apple.rst Fix the type of the invoke function in the block ABI documentation 2020-09-04 10:29:09 -07:00
Block-ABI-Apple.txt
BlockLanguageSpec.rst
CMakeLists.txt
ClangCheck.rst
ClangCommandLineReference.rst [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
ClangFormat.rst Fix -Wno-error= parsing in clang-format. 2020-12-17 22:23:42 +01:00
ClangFormatStyleOptions.rst [clang-format] Option for empty lines after an access modifier. 2021-04-15 21:03:07 +02:00
ClangFormattedStatus.rst [TextAPI] move source code files out of subdirectory, NFC 2021-04-05 10:24:42 -07:00
ClangOffloadBundler.rst [Clang][Docs] Fix ambiguity in clang-offload-bundler docs 2021-01-11 17:23:24 +00:00
ClangPlugins.rst [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
ClangStaticAnalyzer.rst
ClangTools.rst [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
ConstantInterpreter.rst
ControlFlowIntegrity.rst [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
ControlFlowIntegrityDesign.rst [clang] Fix typos in documentation (NFC) 2021-03-06 15:52:52 -08:00
CrossCompilation.rst
DataFlowSanitizer.rst
DataFlowSanitizerDesign.rst
DriverArchitecture.png
DriverInternals.rst
ExternalClangExamples.rst
FAQ.rst
HardwareAssistedAddressSanitizerDesign.rst [HWASan] Mention x86_64 aliasing mode in design doc. 2021-03-25 14:22:20 -07:00
HowToSetupToolingForLLVM.rst
InternalsManual.rst [clang][cli][docs] Clarify marshalling infrastructure documentation 2021-05-04 15:16:32 +02:00
IntroductionToTheClangAST.rst
ItaniumMangleAbiTags.rst
JSONCompilationDatabase.rst [docs] Clarify compile_flags.txt subtleties 2021-01-31 11:16:59 +01:00
LTOVisibility.rst [Docs] Document --lto-whole-program-visibility 2020-08-25 19:44:54 -07:00
LanguageExtensions.rst [OpenCL] Add clang extension for bit-fields. 2021-05-24 12:42:17 +01:00
LeakSanitizer.rst [lsan][docs] Clarify supported platforms 2021-04-21 10:27:55 -07:00
LibASTImporter.rst
LibASTMatchers.rst
LibASTMatchersReference.html [ASTMatchers] Add forCallable(), a generalization of forFunction(). 2021-05-13 11:25:00 -07:00
LibASTMatchersTutorial.rst [clang-tooling] Prevent llvm::fatal_error on invalid CLI option 2021-01-29 10:15:06 +01:00
LibFormat.rst
LibTooling.rst [Branch-Rename] Fix some links 2021-02-01 16:43:21 +05:30
MSVCCompatibility.rst
Makefile.sphinx
MatrixTypes.rst [Matrix] Add missing newline to appease sphinx. 2021-03-12 09:33:36 +00:00
MemorySanitizer.rst [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
Modules.rst Allow searching for prebuilt implicit modules. 2020-11-10 10:14:13 -08:00
ObjectiveCLiterals.rst
OpenCLSupport.rst [OpenCL][Docs] Minor update to OpenCL 3.0 2021-05-24 14:19:22 +01:00
OpenMPSupport.rst [OpenMP5][DOCS] Update status of masked construct and correct the color 2021-04-15 17:19:04 -05:00
PCHInternals.rst
PCHLayout.graffle
PCHLayout.png
RAVFrontendAction.rst [docs] Use make_unique in FrontendAction example 2021-04-20 13:47:16 -04:00
README.txt
RefactoringEngine.rst
ReleaseNotes.rst Support GCC's -fstack-usage flag 2021-05-15 10:22:49 -07:00
SYCLSupport.rst [SYCL] Enable `opencl_global_[host,device]` attributes for SYCL 2021-05-18 10:27:35 +03:00
SafeStack.rst
SanitizerCoverage.rst [SanitizeCoverage] Add support for NoSanitizeCoverage function attribute 2021-05-25 12:57:14 +02:00
SanitizerSpecialCaseList.rst [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
SanitizerStats.rst
ShadowCallStack.rst
SourceBasedCodeCoverage.rst Coverage: Document how to collect a profile without a filesystem 2021-04-22 11:29:39 -07:00
ThinLTO.rst [docs] Try to make this bullet list in ThinLTO.rst actually be a bullet list 2020-11-24 14:08:42 +01:00
ThreadSafetyAnalysis.rst Thread safety analysis: Improve documentation for ASSERT_CAPABILITY 2020-09-26 22:16:50 +02:00
ThreadSanitizer.rst [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
Toolchain.rst clang: libstdc++ LWM is 4.8.3 2021-04-22 05:26:07 -07:00
Tooling.rst
UndefinedBehaviorSanitizer.rst [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
UsersManual.rst [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
conf.py [docs] Bump the trunk major version to 13 and update copyright year. 2021-05-03 18:44:47 +02:00
doxygen-mainpage.dox
doxygen.cfg.in
index.rst [Doc] Add SYCLSupport.rst to index toctree. 2021-04-26 16:16:10 +03:00
make.bat

README.txt

See llvm/docs/README.txt