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

Mingjie Xu via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 20 02:11:20 PDT 2025


Enna1 wrote:

> Can we add a test for this?

Sorry, I don't have a test.

This issue is exposed when I add `Wundef` to compiler flags.

> [12/21] Building CXX object compiler-rt/lib/hwasan/CMakeFiles/RTHwasanAliases_dynamic.x86_64.dir/hwasan_allocation_functions.cpp.o
In file included from /data00/home/xumingjie.enna1/llvm-project/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp:15:
In file included from /data00/home/xumingjie.enna1/llvm-project/compiler-rt/lib/hwasan/hwasan.h:17:
In file included from /data00/home/xumingjie.enna1/llvm-project/compiler-rt/lib/hwasan/hwasan_flags.h:15:
In file included from /data00/home/xumingjie.enna1/llvm-project/compiler-rt/lib/hwasan/../sanitizer_common/sanitizer_internal_defs.h:15:
/data00/home/xumingjie.enna1/llvm-project/compiler-rt/lib/hwasan/../sanitizer_common/sanitizer_platform.h:415:5: warning: 'SANITIZER_GO' is not defined, evaluates to 0 [-Wundef]
  415 | #if SANITIZER_GO == 0
      |     ^
In file included from /data00/home/xumingjie.enna1/llvm-project/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp:16:
/data00/home/xumingjie.enna1/llvm-project/compiler-rt/lib/hwasan/../interception/interception.h:171:7: warning: 'SANITIZER_AIX' is not defined, evaluates to 0 [-Wundef]
  171 | #elif SANITIZER_AIX
      |       ^
/data00/home/xumingjie.enna1/llvm-project/compiler-rt/lib/hwasan/../interception/interception.h:380:5: warning: 'SANITIZER_AIX' is not defined, evaluates to 0 [-Wundef]
  380 | #if SANITIZER_AIX
      |     ^
/data00/home/xumingjie.enna1/llvm-project/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp:26:7: warning: 'CAN_SANITIZE_LEAKS' is not defined, evaluates to 0 [-Wundef]
   26 | #  if CAN_SANITIZE_LEAKS
      |       ^
/data00/home/xumingjie.enna1/llvm-project/compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp:33:7: warning: 'CAN_SANITIZE_LEAKS' is not defined, evaluates to 0 [-Wundef]
   33 | #  if CAN_SANITIZE_LEAKS
      |       ^
5 warnings generated.


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


More information about the llvm-commits mailing list