https://gcc.gnu.org/g:f27da74230644cda0b3391955a61781da7164988
commit r17-5280-gf27da74230644cda0b3391955a61781da7164988 Author: Jerry DeLisle <[email protected]> Date: Sat Oct 17 10:05:42 2026 -0700 libgfortran: caf_shmem: remove dead robust mutex setup The pthread_mutexattr_setrobust calls were guarded by #ifdef PTHREAD_MUTEX_ROBUST, which glibc defines as an enumerator rather than a macro, so they were never compiled there. Where it is a macro the mutexes became robust, but EOWNERDEAD was never handled, so a mutex whose owner died became unusable. Remove the setup, and the executable bit the two files had. Assisted-by: Claude Opus 5.5 libgfortran/ChangeLog: * caf/shmem/thread_support.c (initialize_shared_mutex) (initialize_shared_errorcheck_mutex): Do not make the mutex robust. * caf/shmem/thread_support.h: Remove the executable bit. Diff: --- libgfortran/caf/shmem/thread_support.c | 6 ------ libgfortran/caf/shmem/thread_support.h | 0 2 files changed, 6 deletions(-) diff --git a/libgfortran/caf/shmem/thread_support.c b/libgfortran/caf/shmem/thread_support.c old mode 100755 new mode 100644 index dc907c95b0ab..f4b9f422dfae --- a/libgfortran/caf/shmem/thread_support.c +++ b/libgfortran/caf/shmem/thread_support.c @@ -50,9 +50,6 @@ initialize_shared_mutex (caf_shmem_mutex *mutex) pthread_mutexattr_t mattr; ERRCHECK (pthread_mutexattr_init (&mattr)); ERRCHECK (pthread_mutexattr_setpshared (&mattr, PTHREAD_PROCESS_SHARED)); -#ifdef PTHREAD_MUTEX_ROBUST - ERRCHECK (pthread_mutexattr_setrobust (&mattr, PTHREAD_MUTEX_ROBUST)); -#endif ERRCHECK (pthread_mutex_init (mutex, &mattr)); ERRCHECK (pthread_mutexattr_destroy (&mattr)); } @@ -64,9 +61,6 @@ initialize_shared_errorcheck_mutex (caf_shmem_mutex *mutex) ERRCHECK (pthread_mutexattr_init (&mattr)); ERRCHECK (pthread_mutexattr_settype (&mattr, PTHREAD_MUTEX_ERRORCHECK)); ERRCHECK (pthread_mutexattr_setpshared (&mattr, PTHREAD_PROCESS_SHARED)); -#ifdef PTHREAD_MUTEX_ROBUST - ERRCHECK (pthread_mutexattr_setrobust (&mattr, PTHREAD_MUTEX_ROBUST)); -#endif ERRCHECK (pthread_mutex_init (mutex, &mattr)); ERRCHECK (pthread_mutexattr_destroy (&mattr)); } diff --git a/libgfortran/caf/shmem/thread_support.h b/libgfortran/caf/shmem/thread_support.h old mode 100755 new mode 100644
