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

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 10:23:02 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

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

Author: Lei Huang (lei137)

<details>
<summary>Changes</summary>

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.

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


1 Files Affected:

- (modified) compiler-rt/test/msan/dladdr1_test.c (+1-1) 


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

``````````

</details>


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


More information about the llvm-commits mailing list