[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:54 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: None (Kaur-sukhmani)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/78984.diff


1 Files Affected:

- (modified) compiler-rt/lib/hwasan/hwasan_report.cpp (+1-3) 


``````````diff
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)

``````````

</details>


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


More information about the llvm-commits mailing list