]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Darwin DRD and Helgrind: clean up suppressions
authorPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 28 Nov 2025 12:36:43 +0000 (13:36 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Fri, 28 Nov 2025 12:36:43 +0000 (13:36 +0100)
Also fix one DRD testcase where a pthread function returns a
different error code.

darwin17.supp
drd/tests/trylock.c

index 90d99f0748b438ba69de1e6bced8267e09966d2e..6966f101cdced42b15375824b398bf65aa3f8449 100644 (file)
    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
    fun:*NXHash*
 }
 
-{
-   OSX1013:_pthread_start
-   Helgrind:Race
-   fun:_pthread_start
-   fun:thread_start
-}
-
 {
    OSX1013:vng_aes_encrypt_opt
    Memcheck:Value8
 }
 
 {
-   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
    fun:cache_fill
 }
 
-{
-   OSX1013:helgrind:pthead_once
-   Helgrind:Race
-   ...
-   fun:pthread_once
-}
-
 {
    OSX1013:helgrind:objc_destructInstance
    Helgrind:Race
 }
 
 {
-   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
    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
 {
    fun:_ZN9rwlock_ttILb0EE5writeEv
 }
 
+{
+   OSX1013:helgrind:gomp_barrier_wait
+   Helgrind:Race
+   fun:gomp_barrier_wait
+}
 
 {
    OSX1013:drd:object_dispose
    fun:objc_destructInstance
 }
 
-{
-   OSX1013:drd:pthread_rwlock_unlock
-   drd:ConflictingAccess
-   fun:pthread_rwlock_unlock
-}
-
 {
    OSX1013:drd:xpc_pipe_routine
    drd:ConflictingAccess
index 1aca703408244845cd75ecfbf2295d96d1ab1307..b2199e30577e240418e23dd385096f31e426aa94 100644 (file)
@@ -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);