[compiler-rt] [llvm] Revert "[compiler-rt][asan] Add asan checks for __builtin_assume_dereferencable" (PR #193655)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 20:57:30 PDT 2026


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 origin/main HEAD --extensions inc,h,cpp -- compiler-rt/include/sanitizer/asan_interface.h compiler-rt/lib/asan/asan_errors.cpp compiler-rt/lib/asan/asan_errors.h compiler-rt/lib/asan/asan_interface.inc compiler-rt/lib/asan/asan_report.cpp compiler-rt/lib/asan/asan_report.h compiler-rt/lib/asan/asan_rtl.cpp compiler-rt/test/asan/TestCases/debug_report.cpp llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/compiler-rt/lib/asan/asan_errors.cpp b/compiler-rt/lib/asan/asan_errors.cpp
index c4100cf72..5ada885d7 100644
--- a/compiler-rt/lib/asan/asan_errors.cpp
+++ b/compiler-rt/lib/asan/asan_errors.cpp
@@ -498,7 +498,8 @@ ErrorGeneric::ErrorGeneric(u32 tid, uptr pc_, uptr bp_, uptr sp_, uptr addr,
         case kAsanHeapFreeMagic:
           bug_descr = "heap-use-after-free";
           bug_type_score = 20;
-          if (!is_write) read_after_free_bonus = 18;
+          if (!is_write)
+            read_after_free_bonus = 18;
           break;
         case kAsanStackLeftRedzoneMagic:
           bug_descr = "stack-buffer-underflow";
@@ -518,7 +519,8 @@ ErrorGeneric::ErrorGeneric(u32 tid, uptr pc_, uptr bp_, uptr sp_, uptr addr,
         case kAsanStackAfterReturnMagic:
           bug_descr = "stack-use-after-return";
           bug_type_score = 30;
-          if (!is_write) read_after_free_bonus = 18;
+          if (!is_write)
+            read_after_free_bonus = 18;
           break;
         case kAsanUserPoisonedMemoryMagic:
           bug_descr = "use-after-poison";
@@ -695,7 +697,7 @@ void ErrorGeneric::Print() {
 
   Printf("%s%s of size %zu at %p thread %s%s\n", d.Access(),
          access_size ? (is_write ? "WRITE" : "READ") : "ACCESS", access_size,
-         (void *)addr, AsanThreadIdAndName(tid).c_str(), d.Default());
+         (void*)addr, AsanThreadIdAndName(tid).c_str(), d.Default());
 
   scariness.Print();
   GET_STACK_TRACE_FATAL(pc, bp);

``````````

</details>


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


More information about the llvm-commits mailing list