[all-commits] [llvm/llvm-project] 410262: [rtsan][llvm][NFC] Rename sanitize_realtime_unsafe...

davidtrevelyan via All-commits all-commits at lists.llvm.org
Sat Oct 26 05:06:32 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4102625380823e58d7b13f01b5bd979a29bce19e
      https://github.com/llvm/llvm-project/commit/4102625380823e58d7b13f01b5bd979a29bce19e
  Author: davidtrevelyan <davidtrevelyan at users.noreply.github.com>
  Date:   2024-10-26 (Sat, 26 Oct 2024)

  Changed paths:
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/test/CodeGen/rtsan_attribute_inserted.c
    M clang/test/CodeGen/rtsan_no_attribute_sanitizer_disabled.c
    M compiler-rt/lib/rtsan/tests/rtsan_test_functional.cpp
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/Bitcode/LLVMBitCodes.h
    M llvm/include/llvm/IR/Attributes.td
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/lib/Transforms/Instrumentation/RealtimeSanitizer.cpp
    M llvm/lib/Transforms/Utils/CodeExtractor.cpp
    M llvm/test/Bitcode/attributes.ll
    M llvm/test/Bitcode/compatibility.ll
    A llvm/test/Instrumentation/RealtimeSanitizer/rtsan_blocking.ll
    R llvm/test/Instrumentation/RealtimeSanitizer/rtsan_unsafe.ll
    M llvm/test/Verifier/rtsan-attrs.ll

  Log Message:
  -----------
  [rtsan][llvm][NFC] Rename sanitize_realtime_unsafe attr to sanitize_realtime_blocking (#113155)

# What

This PR renames the newly-introduced llvm attribute
`sanitize_realtime_unsafe` to `sanitize_realtime_blocking`. Likewise,
sibling variables such as `SanitizeRealtimeUnsafe` are renamed to
`SanitizeRealtimeBlocking` respectively. There are no other functional
changes.


# Why?

- There are a number of problems that can cause a function to be
real-time "unsafe",
- we wish to communicate what problems rtsan detects and *why* they're
unsafe, and
- a generic "unsafe" attribute is, in our opinion, too broad a net -
which may lead to future implementations that need extra contextual
information passed through them in order to communicate meaningful
reasons to users.
- We want to avoid this situation and make the runtime library boundary
API/ABI as simple as possible, and
- we believe that restricting the scope of attributes to names like
`sanitize_realtime_blocking` is an effective means of doing so.

We also feel that the symmetry between `[[clang::blocking]]` and
`sanitize_realtime_blocking` is easier to follow as a developer.

# Concerns

- I'm aware that the LLVM attribute `sanitize_realtime_unsafe` has been
part of the tree for a few weeks now (introduced here:
https://github.com/llvm/llvm-project/pull/106754). Given that it hasn't
been released in version 20 yet, am I correct in considering this to not
be a breaking change?



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list