From 8e16d819de9492281e62b37ac7dc4c2a95eb6515 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 1 Jul 2025 14:20:48 +0200 Subject: [PATCH] Downstream ABI adjustment for pthread_cond_t (RHEL-82285) Resolves: RHEL-82285 --- glibc-RHEL-82285.patch | 44 ++++++++++++++++++++++++++++++++++++++++++ glibc.spec | 6 +++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 glibc-RHEL-82285.patch diff --git a/glibc-RHEL-82285.patch b/glibc-RHEL-82285.patch new file mode 100644 index 0000000..b654242 --- /dev/null +++ b/glibc-RHEL-82285.patch @@ -0,0 +1,44 @@ +External ABI adjustment for pthread_cond_t. This downstream-only +patch is necessary because upstream unfortunately changed the +definition of pthread_cond_t on release branches. The definition +of pthread_cond_t is semi-opaque, but ABI analysis tooling does +not know that. Changing the definition results in incorrect +ABI change errors if application uses pthread_cond_t at any +ABI boundary. + +This patch reverts the installed header changes in +glibc-upstream-2.39-188.patch and glibc-upstream-2.39-193.patch. +Furthermore, use __glibc_unused___g_refs to match RHEL 9. + +diff --git a/sysdeps/nptl/bits/thread-shared-types.h b/sysdeps/nptl/bits/thread-shared-types.h +index bccc2003ec6dea5c..1d325f58883db08d 100644 +--- a/sysdeps/nptl/bits/thread-shared-types.h ++++ b/sysdeps/nptl/bits/thread-shared-types.h +@@ -95,12 +95,11 @@ struct __pthread_cond_s + { + __atomic_wide_counter __wseq; + __atomic_wide_counter __g1_start; +- unsigned int __g_size[2] __LOCK_ALIGNMENT; ++ unsigned int __glibc_unused___g_refs[2] __LOCK_ALIGNMENT; ++ unsigned int __g_size[2]; + unsigned int __g1_orig_size; + unsigned int __wrefs; + unsigned int __g_signals[2]; +- unsigned int __unused_initialized_1; +- unsigned int __unused_initialized_2; + }; + + typedef unsigned int __tss_t; +diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h +index e0f24418fe4233f0..3d4f4a756c66750d 100644 +--- a/sysdeps/nptl/pthread.h ++++ b/sysdeps/nptl/pthread.h +@@ -152,7 +152,7 @@ enum + + + /* Conditional variable handling. */ +-#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, 0, 0, {0, 0}, 0, 0 } } ++#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } } + + + /* Cleanup buffers */ diff --git a/glibc.spec b/glibc.spec index 921a729..bd19100 100644 --- a/glibc.spec +++ b/glibc.spec @@ -145,7 +145,7 @@ Version: %{glibcversion} # - It allows using the Release number without the %%dist tag in the dependency # generator to make the generated requires interchangeable between Rawhide # and ELN (.elnYY < .fcXX). -%global baserelease 40 +%global baserelease 41 Release: %{baserelease}%{?dist} # Licenses: @@ -573,6 +573,7 @@ Patch255: glibc-upstream-2.39-208.patch Patch256: glibc-upstream-2.39-209.patch Patch257: glibc-upstream-2.39-210.patch Patch258: glibc-upstream-2.39-211.patch +Patch259: glibc-RHEL-82285.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2570,6 +2571,9 @@ update_gconv_modules_cache () %endif %changelog +* Tue Jul 01 2025 Florian Weimer - 2.39-41 +- Downstream ABI adjustment for pthread_cond_t (RHEL-82285) + * Tue Jun 17 2025 Arjun Shankar - 2.39-40 - Sync with upstream branch release/2.39/master (RHEL-87416) - Upstream commit: cff1042cceec3502269947e96cf7023451af22f3