https://sourceware.org/cgit/valgrind/commit/?id=6a5c15def701a4dfccec322d2367eb4464f8a88e
commit 6a5c15def701a4dfccec322d2367eb4464f8a88e
Author: Paul Floyd <pj...@wa...>
Date: Fri Nov 28 13:36:43 2025 +0100
Darwin DRD and Helgrind: clean up suppressions
Also fix one DRD testcase where a pthread function returns a
different error code.
Diff:
---
darwin17.supp | 134 ++++------------------------------------------------
drd/tests/trylock.c | 7 ++-
2 files changed, 16 insertions(+), 125 deletions(-)
diff --git a/darwin17.supp b/darwin17.supp
index 90d99f0748..6966f101cd 100644
--- a/darwin17.supp
+++ b/darwin17.supp
@@ -585,13 +585,6 @@
obj:*CoreServices.framework*LaunchServices*
}
-##{
-## OSX1013:libsystem_pthread-1
-## Memcheck:Cond
-## obj:*libsystem_pthread*dylib*
-## obj:*ImageIO.framework*ImageIO*
-## obj:*ImageIO.framework*ImageIO*
-##}
{
OSX1013:ApplicationServices-1
@@ -779,13 +772,6 @@
fun:*NXHash*
}
-{
- OSX1013:_pthread_start
- Helgrind:Race
- fun:_pthread_start
- fun:thread_start
-}
-
{
OSX1013:vng_aes_encrypt_opt
Memcheck:Value8
@@ -799,40 +785,9 @@
}
{
- OSX1013:helgrind:_pthread_deallocate
- Helgrind:Race
- fun:_pthread_deallocate
-}
-
-{
- OSX1013:helgrind:_pthread_join_cleanup
- Helgrind:Race
- fun:_pthread_join_cleanup
-}
-
-{
- OSX1013:helgrind:_pthread_join
- Helgrind:Race
- ...
- fun:_pthread_join
-}
-
-{
- OSX1013:helgrind:_pthread_terminate
+ OSX1013:helgrind:pthread library
Helgrind:Race
- fun:_pthread_terminate
-}
-
-{
- OSX1013:helgrind:_pthread_exit
- Helgrind:Race
- fun:_pthread_exit
-}
-
-{
- OSX1013:helgrind:_pthread_body
- Helgrind:Race
- fun:_pthread_body
+ obj:/usr/lib/system/libsystem_pthread.dylib
}
# various getaddrinfo suppressions
@@ -890,13 +845,6 @@
fun:cache_fill
}
-{
- OSX1013:helgrind:pthead_once
- Helgrind:Race
- ...
- fun:pthread_once
-}
-
{
OSX1013:helgrind:objc_destructInstance
Helgrind:Race
@@ -919,50 +867,14 @@
}
{
- OSX1013:nanosleep
+ OSX1013:drd:nanosleep
drd:ConflictingAccess
fun:nanosleep
}
{
- OSX1013:_pthread_join
+ OSX1013:drd:pthread library
drd:ConflictingAccess
- fun:_pthread_join
-}
-{
- OSX1013:usleep
- drd:ConflictingAccess
- fun:pthread_testcancel
- fun:usleep
-}
-{
- OSX1013:_pthread_join_cleanup
- drd:ConflictingAccess
- fun:_pthread_join_cleanup
-}
-{
- OSX1013:pthread_mutex_destroy
- drd:ConflictingAccess
- fun:pthread_mutex_destroy
-}
-{
- OSX1013:pthread_cond_destroy
- drd:ConflictingAccess
- fun:pthread_cond_destroy
-}
-{
- OSX1013:pthread_mutex_unlock
- drd:ConflictingAccess
- fun:pthread_mutex_unlock
-}
-{
- OSX1013:pthread_mutex_lock
- drd:ConflictingAccess
- fun:pthread_mutex_lock
-}
-{
- OSX1013:_pthread_deallocate
- drd:ConflictingAccess
- fun:_pthread_deallocate
+ obj:/usr/lib/system/libsystem_pthread.dylib
}
{
OSX1013:std::timed_mutex::unlock
@@ -974,36 +886,11 @@
drd:ConflictingAccess
fun:_ZNSt3__111timed_mutex14try_lock_untilINS_6chrono12steady_clockENS2_8durationIxNS_5ratio*
}
-{
- OSX1013:_pthread_cond_updateval
- drd:ConflictingAccess
- fun:_pthread_cond_updateval
-}
-{
- OSX1013:pthread_cond_signal
- drd:ConflictingAccess
- fun:pthread_cond_signal
-}
-{
- OSX1013:_pthread_mutex_droplock
- drd:ConflictingAccess
- fun:_pthread_mutex_droplock
-}
-{
- OSX1013:_pthread_cond_wait
- drd:ConflictingAccess
- fun:_pthread_cond_wait
-}
{
OSX1013:mach_timebase_info
drd:ConflictingAccess
fun:mach_timebase_info
}
-{
- OSX1013:pthread_testcancel
- drd:ConflictingAccess
- fun:pthread_testcancel
-}
# take care with this, don't want to suppress anything in user
# thread functions
{
@@ -1116,6 +1003,11 @@
fun:_ZN9rwlock_ttILb0EE5writeEv
}
+{
+ OSX1013:helgrind:gomp_barrier_wait
+ Helgrind:Race
+ fun:gomp_barrier_wait
+}
{
OSX1013:drd:object_dispose
@@ -1138,12 +1030,6 @@
fun:objc_destructInstance
}
-{
- OSX1013:drd:pthread_rwlock_unlock
- drd:ConflictingAccess
- fun:pthread_rwlock_unlock
-}
-
{
OSX1013:drd:xpc_pipe_routine
drd:ConflictingAccess
diff --git a/drd/tests/trylock.c b/drd/tests/trylock.c
index 1aca703408..b2199e3057 100644
--- a/drd/tests/trylock.c
+++ b/drd/tests/trylock.c
@@ -57,7 +57,12 @@ int main(int argc, char** argv)
#endif
fprintf(stderr, "Attempt to lock for writing recursively (not allowed).\n");
r = pthread_rwlock_wrlock(&rwlock); assert(r == 0);
- r = pthread_rwlock_trywrlock(&rwlock); assert(r == EBUSY);
+ r = pthread_rwlock_trywrlock(&rwlock);
+#if defined(__APPLE__)
+ assert(r == EDEADLK);
+#else
+ assert(r == EBUSY);
+#endif
r = pthread_rwlock_unlock(&rwlock); assert(r == 0);
r = pthread_rwlock_destroy(&rwlock); assert(r == 0);
|