[compiler-rt] scudo: Support free_sized and free_aligned_sized from C23 (PR #146556)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 1 08:53:45 PDT 2025


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 HEAD~1 HEAD --extensions h,inc,cpp -- compiler-rt/lib/scudo/standalone/chunk.h compiler-rt/lib/scudo/standalone/combined.h compiler-rt/lib/scudo/standalone/options.h compiler-rt/lib/scudo/standalone/report.cpp compiler-rt/lib/scudo/standalone/report.h compiler-rt/lib/scudo/standalone/wrappers_c.inc compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/lib/scudo/standalone/report.cpp b/compiler-rt/lib/scudo/standalone/report.cpp
index 7fc219f5d..a0c1b4220 100644
--- a/compiler-rt/lib/scudo/standalone/report.cpp
+++ b/compiler-rt/lib/scudo/standalone/report.cpp
@@ -161,7 +161,8 @@ void NORETURN reportDeleteSizeMismatch(const void *Ptr, uptr Size,
       Size, ExpectedSize);
 }
 
-void NORETURN reportFreeSizeMismatch(const void *Ptr, uptr Size, uptr ExpectedSize) {
+void NORETURN reportFreeSizeMismatch(const void *Ptr, uptr Size,
+                                     uptr ExpectedSize) {
   ScopedErrorReport Report;
   Report.append(
       "invalid sized free when deallocating address %p (%zu vs %zu)\n", Ptr,
diff --git a/compiler-rt/lib/scudo/standalone/report.h b/compiler-rt/lib/scudo/standalone/report.h
index 6a8d9ccfe..64c03a46f 100644
--- a/compiler-rt/lib/scudo/standalone/report.h
+++ b/compiler-rt/lib/scudo/standalone/report.h
@@ -45,8 +45,10 @@ void NORETURN reportInvalidChunkState(AllocatorAction Action, const void *Ptr);
 void NORETURN reportMisalignedPointer(AllocatorAction Action, const void *Ptr);
 void NORETURN reportDeallocTypeMismatch(AllocatorAction Action, const void *Ptr,
                                         u8 TypeA, u8 TypeB);
-void NORETURN reportDeleteSizeMismatch(const void *Ptr, uptr Size, uptr ExpectedSize);
-void NORETURN reportFreeSizeMismatch(const void *Ptr, uptr Size, uptr ExpectedSize);
+void NORETURN reportDeleteSizeMismatch(const void *Ptr, uptr Size,
+                                       uptr ExpectedSize);
+void NORETURN reportFreeSizeMismatch(const void *Ptr, uptr Size,
+                                     uptr ExpectedSize);
 void NORETURN reportFreeAlignmentMismatch(const void *Ptr, uptr Alignment);
 
 // C wrappers errors.

``````````

</details>


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


More information about the llvm-commits mailing list