[compiler-rt] [rtsan] Fix issue when intercepted function was not execve in test (PR #144018)
Chris Apple via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 12 22:04:11 PDT 2025
https://github.com/cjappl created https://github.com/llvm/llvm-project/pull/144018
On my mac, this started having `os_unfair_lock_lock` as the intercepted function.
I dropped the name so any second intercepted call will pass the test.
>From a761b09b9e796a1a7c3a37eeae79e0b318339bc0 Mon Sep 17 00:00:00 2001
From: Chris Apple <cja-private at pm.me>
Date: Thu, 12 Jun 2025 23:02:19 -0600
Subject: [PATCH] [rtsan] Fix issue when intercepted function was not execve in
test
---
compiler-rt/test/rtsan/fork_exec.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/compiler-rt/test/rtsan/fork_exec.cpp b/compiler-rt/test/rtsan/fork_exec.cpp
index 3b2d2e5ca2f5d..5890a0936a2f7 100644
--- a/compiler-rt/test/rtsan/fork_exec.cpp
+++ b/compiler-rt/test/rtsan/fork_exec.cpp
@@ -45,7 +45,12 @@ int main() MAYBE_NONBLOCKING {
}
// CHECK-NOHALT: Intercepted call to {{.*}} `fork` {{.*}}
-// CHECK-NOHALT: Intercepted call to {{.*}} `execve` {{.*}}
+
+// We should also get some other intercepted call. On some systems this
+// is `execve`, on others, it's a lock to set up `execve`. In either
+// case, just check that we get a second intercepted call, don't sweat
+// the name.
+// CHECK-NOHALT: Intercepted call to {{.*}}
// usleep checks that rtsan is still enabled in the parent process
// See note in our interceptors file for why we don't look for `wait`
More information about the llvm-commits
mailing list