[compiler-rt] Fixed a possible null dereference problem #77737 (PR #78984)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 06:52:07 PST 2024


https://github.com/Kaur-sukhmani created https://github.com/llvm/llvm-project/pull/78984

None

>From e9ed5551aa4d4346a01fbc6f960ee42ce6d5f101 Mon Sep 17 00:00:00 2001
From: Sukhmani <ksukhmani0910 at chromium.org>
Date: Mon, 22 Jan 2024 20:10:45 +0530
Subject: [PATCH] Fixed a possible null dereference problem #77737

---
 compiler-rt/lib/hwasan/hwasan_report.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/compiler-rt/lib/hwasan/hwasan_report.cpp b/compiler-rt/lib/hwasan/hwasan_report.cpp
index 784cfb904aa275..618a0e2da7ccfe 100644
--- a/compiler-rt/lib/hwasan/hwasan_report.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_report.cpp
@@ -221,9 +221,7 @@ static void PrintStackAllocations(const StackAllocationsRingBuffer *sa,
       for (LocalInfo &local : frame.locals) {
         if (!local.has_frame_offset || !local.has_size || !local.has_tag_offset)
           continue;
-        if (!(local.name && internal_strlen(local.name)) &&
-            !(local.function_name && internal_strlen(local.name)) &&
-            !(local.decl_file && internal_strlen(local.decl_file)))
+        if (!(local.name && internal_strlen(local.name)))
           continue;
         tag_t obj_tag = base_tag ^ local.tag_offset;
         if (obj_tag != addr_tag)



More information about the llvm-commits mailing list