[compiler-rt] [hwasan] Fix suppression of leaks from dlsym (PR #154073)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 18 01:13:43 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

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

Author: Mingjie Xu (Enna1)

<details>
<summary>Changes</summary>

Header "lsan/lsan_common.h" is not included, CAN_SANITIZE_LEAKS macro is expanded to 0, so suppression of leaks from dlsym doesn't take effect.

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


1 Files Affected:

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


``````````diff
diff --git a/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp b/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp
index 25ca0a3b0b68e..7609e6cd65b7a 100644
--- a/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp
@@ -14,6 +14,7 @@
 
 #include "hwasan.h"
 #include "interception/interception.h"
+#include "lsan/lsan_common.h"
 #include "sanitizer_common/sanitizer_allocator_dlsym.h"
 #include "sanitizer_common/sanitizer_allocator_interface.h"
 #include "sanitizer_common/sanitizer_mallinfo.h"

``````````

</details>


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


More information about the llvm-commits mailing list