[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

Alexander Potapenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 13 05:34:20 PDT 2021


glider created this revision.
glider added reviewers: eugenis, melver, browneee, dvyukov.
Herald added subscribers: ormris, dexonsmith, jdoerfert, steven_wu, hiraditya.
Herald added a reviewer: aaron.ballman.
glider requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

The purpose of __attribute__((no_sanitizer_instrumentation)) is to
prevent all kinds of sanitizer instrumentation applied to a certain
function.

The no_sanitize(...) attribute drops instrumentation checks, but may
still insert code preventing false positive reports. In some cases
though (e.g. when building Linux kernel with -fsanitize=kernel-memory
or -fsanitize=thread) the users may want to avoid any kind of
instrumentation.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108029

Files:
  clang/include/clang/Basic/Attr.td
  clang/include/clang/Basic/AttrDocs.td
  clang/lib/CodeGen/CodeGenFunction.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/test/CodeGen/attr-no-sanitize-coverage.c
  clang/test/Misc/pragma-attribute-supported-attributes-list.test
  llvm/include/llvm/AsmParser/LLToken.h
  llvm/include/llvm/IR/Attributes.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108029.366255.patch
Type: text/x-patch
Size: 5249 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210813/2abb2599/attachment.bin>


More information about the llvm-commits mailing list