[llvm-branch-commits] [compiler-rt] [HWASan] use unused tags for uaf tag, if possible (PR #191914)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Apr 13 17:57:57 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 h,cpp -- compiler-rt/lib/hwasan/hwasan.h compiler-rt/lib/hwasan/hwasan_allocator.cpp compiler-rt/lib/hwasan/hwasan_poisoning.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/hwasan/hwasan_poisoning.cpp b/compiler-rt/lib/hwasan/hwasan_poisoning.cpp
index be93ed4cb..1dec1d394 100644
--- a/compiler-rt/lib/hwasan/hwasan_poisoning.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_poisoning.cpp
@@ -33,7 +33,8 @@ namespace __lsan {
 bool WordIsPoisoned(uptr addr) {
   if (!InTaggableRegion(addr))
     return false;
-  tag_t Tag = *reinterpret_cast<tag_t *>(__hwasan::MemToShadow(addr))
-  return Tag >= (1U << __hwasan::HwasanTagBits());
+  tag_t Tag =
+      *reinterpret_cast<tag_t*>(__hwasan::MemToShadow(addr)) return Tag >=
+      (1U << __hwasan::HwasanTagBits());
 }
 }  // namespace __lsan

``````````

</details>


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


More information about the llvm-branch-commits mailing list