[all-commits] [llvm/llvm-project] b0391d: [clang][Codegen] Introduce the disable_sanitizer_i...

Alexander Potapenko via All-commits all-commits at lists.llvm.org
Fri Aug 20 05:06:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0391dfc737ede147e128fe877045f61fc5e4905
      https://github.com/llvm/llvm-project/commit/b0391dfc737ede147e128fe877045f61fc5e4905
  Author: Alexander Potapenko <glider at google.com>
  Date:   2021-08-20 (Fri, 20 Aug 2021)

  Changed paths:
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/AttrDocs.td
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    A clang/test/CodeGen/attr-disable-sanitizer-instrumentation.c
    M clang/test/Misc/pragma-attribute-supported-attributes-list.test
    M llvm/docs/BitCodeFormat.rst
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/AsmParser/LLToken.h
    M llvm/include/llvm/Bitcode/LLVMBitCodes.h
    M llvm/include/llvm/IR/Attributes.td
    M llvm/lib/AsmParser/LLLexer.cpp
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/lib/Transforms/Utils/CodeExtractor.cpp
    M llvm/test/Bitcode/attributes.ll
    M llvm/test/Bitcode/compatibility.ll

  Log Message:
  -----------
  [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute

The purpose of __attribute__((disable_sanitizer_instrumentation)) is to
prevent all kinds of sanitizer instrumentation applied to a certain
function, Objective-C method, or global variable.

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.

Differential Revision: https://reviews.llvm.org/D108029




More information about the All-commits mailing list