[compiler-rt] Fix prctl to handle PR_GET_PDEATHSIG. (PR #101749)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 13:47:37 PDT 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 3e4af616334eae532f308605b89ff158dd195180 374fa1ccf32895d9a076f965656866cb5ed540f7 --extensions inc,cpp -- compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc compiler-rt/test/sanitizer_common/TestCases/Linux/prctl.cpp
``````````

</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 a2266aeb4f..af3c71053c 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -1273,7 +1273,7 @@ INTERCEPTOR(int, prctl, int option, unsigned long arg2, unsigned long arg3,
              arg2 == PR_SCHED_CORE_GET) {
     COMMON_INTERCEPTOR_WRITE_RANGE(ctx, (u64*)(arg5), sizeof(u64));
   } else if (res != -1 && option == PR_GET_PDEATHSIG) {
-    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, (u64*)(arg2), sizeof(u64));
+    COMMON_INTERCEPTOR_WRITE_RANGE(ctx, (u64 *)(arg2), sizeof(u64));
   }
   return res;
 }

``````````

</details>


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


More information about the llvm-commits mailing list