[compiler-rt] [DIAG][msan] fix libc check string for dladdr1 call (PR #69359)

Lei Huang via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 10:21:16 PDT 2023


https://github.com/lei137 created https://github.com/llvm/llvm-project/pull/69359

The check for dladdr1 for shared libc is too strict. Depending on how the system is setup we sometimes pick up the none generic lib name with the version string in it.

Update check to for libc to account for version string.

>From 598fccdf05c9df902a2c7076c2d1b49b306d1f12 Mon Sep 17 00:00:00 2001
From: Lei Huang <lei at ca.ibm.com>
Date: Tue, 17 Oct 2023 12:58:46 -0400
Subject: [PATCH] [DIAG][msan] fix libc check string for dladdr1 call

The check for dladdr1 for shared libc is too strict.
Depending on how the system is setup we sometimes pick up
the none generic lib name with the version string in it.

Update check to for libc to account for version string.
---
 compiler-rt/test/msan/dladdr1_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/test/msan/dladdr1_test.c b/compiler-rt/test/msan/dladdr1_test.c
index dc5f6fdf9f91728..534f5f9cc193a2f 100644
--- a/compiler-rt/test/msan/dladdr1_test.c
+++ b/compiler-rt/test/msan/dladdr1_test.c
@@ -60,7 +60,7 @@ int main(int argc, char *argv[]) {
       fflush(stdout);
       map_ptr = map_ptr->l_next;
     }
-    // CHECK: libc.so
+    // CHECK: libc{{[\-]*.*}}.so
     // CHECK: dladdr1_test
   }
 



More information about the llvm-commits mailing list