[compiler-rt] [sanitizer_common] Intercept timespec_get except for hwasan (PR #117080)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 16:21:36 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 53a6a11e0d51229d341b8906252645cd8a5de796 7e88686e5750a415060253b5c19d856a15ddf358 --extensions h,inc -- compiler-rt/lib/hwasan/hwasan_platform_interceptors.h compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
index 07b65a1f0c..c0fd55b3b3 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -2398,13 +2398,14 @@ INTERCEPTOR(int, timespec_get, struct __sanitizer_timespec *ts, int base) {
   // https://github.com/google/sanitizers/issues/321.
   int res = REAL(timespec_get)(ts, base);
   if (res) {
-    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ts, sizeof(struct __sanitizer_timespec));
+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ts,
+                                   sizeof(struct __sanitizer_timespec));
   }
   return res;
 }
-#define INIT_TIMESPEC_GET COMMON_INTERCEPT_FUNCTION(timespec_get);
+#  define INIT_TIMESPEC_GET COMMON_INTERCEPT_FUNCTION(timespec_get);
 #else
-#define INIT_TIMESPEC_GET
+#  define INIT_TIMESPEC_GET
 #endif
 
 #if SANITIZER_INTERCEPT_GLOB

``````````

</details>


https://github.com/llvm/llvm-project/pull/117080


More information about the llvm-commits mailing list