Skip to content

[rtsan][NFC] Add documentation link to Function Effects #113979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

cjappl
Copy link
Contributor

@cjappl cjappl commented Oct 28, 2024

No description provided.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Oct 28, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 28, 2024

@llvm/pr-subscribers-clang

Author: Chris Apple (cjappl)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/113979.diff

1 Files Affected:

  • (modified) clang/docs/RealtimeSanitizer.rst (+8-3)
diff --git a/clang/docs/RealtimeSanitizer.rst b/clang/docs/RealtimeSanitizer.rst
index 41b8bbb33baf14..e5f5abfcd9b47e 100644
--- a/clang/docs/RealtimeSanitizer.rst
+++ b/clang/docs/RealtimeSanitizer.rst
@@ -11,11 +11,16 @@ RealtimeSanitizer (a.k.a. RTSan) is a real-time safety testing tool for C and C+
 projects. RTSan can be used to detect real-time violations, i.e. calls to methods
 that are not safe for use in functions with deterministic run time requirements.
 RTSan considers any function marked with the ``[[clang::nonblocking]]`` attribute
-to be a real-time function. If RTSan detects a call to ``malloc``, ``free``,
-``pthread_mutex_lock``, or anything else that could have a non-deterministic
-execution time in a function marked ``[[clang::nonblocking]]``
+to be a real-time function. At run-time, if RTSan detects a call to ``malloc``, 
+``free``, ``pthread_mutex_lock``, or anything else that could have a 
+non-deterministic execution time in a function marked ``[[clang::nonblocking]]``
 RTSan raises an error.
 
+RTSan performs its analysis at run-time but shares the ``[[clang::nonblocking]]`` 
+attribute with the :doc:`FunctionEffectAnalysis` system, which operates at 
+compile-time to detect potential real-time safety violations. For comprehensive 
+detection of real-time safety issues, it is recommended to use both systems together.
+
 The runtime slowdown introduced by RealtimeSanitizer is negligible.
 
 How to build

@cjappl
Copy link
Contributor Author

cjappl commented Oct 28, 2024

CC for review @dougsonos

Copy link
Member

@Sirraide Sirraide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effects paragraph lgtm. I’m not really familiar w/ rtsan, so I can’t comment on the rest.

@dougsonos
Copy link
Contributor

LGTM

@cjappl cjappl merged commit 705f3eb into llvm:main Oct 30, 2024
11 checks passed
@cjappl cjappl deleted the hyperlink_function_effects branch October 30, 2024 17:42
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants