Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DIAG][msan] fix libc check string for dladdr1 call #69359

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

lei137
Copy link
Contributor

@lei137 lei137 commented Oct 17, 2023

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.

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.
@llvmbot
Copy link
Member

llvmbot commented Oct 17, 2023

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

Author: Lei Huang (lei137)

Changes

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

Copy link
Contributor

@thurstond thurstond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find and fix, thanks!

@lei137 lei137 merged commit 6959332 into llvm:main Oct 19, 2023
6 checks passed
@lei137 lei137 deleted the lei/libcxxFailureInvestigation branch July 29, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants