From 0903db4fbcbd3e8699264554d1dced37c60cd2e0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Thu, 19 May 2022 10:12:35 +0000 Subject: [PATCH] import glibc-2.28-202.el8 --- SOURCES/glibc-rh2086853.patch | 30 ++++++++++++++++++++++++++++++ SPECS/glibc.spec | 6 +++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 SOURCES/glibc-rh2086853.patch diff --git a/SOURCES/glibc-rh2086853.patch b/SOURCES/glibc-rh2086853.patch new file mode 100644 index 0000000..d11e4cb --- /dev/null +++ b/SOURCES/glibc-rh2086853.patch @@ -0,0 +1,30 @@ +commit 61a87530108ec9181e1b18a9b727ec3cc3ba7532 +Author: Siddhesh Poyarekar +Date: Fri May 13 10:01:47 2022 +0530 + + fortify: Ensure that __glibc_fortify condition is a constant [BZ #29141] + + The fix c8ee1c85 introduced a -1 check for object size without also + checking that object size is a constant. Because of this, the tree + optimizer passes in gcc fail to fold away one of the branches in + __glibc_fortify and trips on a spurious Wstringop-overflow. The warning + itself is incorrect and the branch does go away eventually in DCE in the + rtl passes in gcc, but the constant check is a helpful hint to simplify + code early, so add it in. + + Resolves: BZ #29141 + Signed-off-by: Siddhesh Poyarekar + +diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h +index 404496c7d6da4fb3..f3d7efdd2a9320f7 100644 +--- a/misc/sys/cdefs.h ++++ b/misc/sys/cdefs.h +@@ -145,7 +145,7 @@ + /* Length is known to be safe at compile time if the __L * __S <= __OBJSZ + condition can be folded to a constant and if it is true, or unknown (-1) */ + #define __glibc_safe_or_unknown_len(__l, __s, __osz) \ +- ((__osz) == (__SIZE_TYPE__) -1 \ ++ ((__builtin_constant_p (__osz) && (__osz) == (__SIZE_TYPE__) -1) \ + || (__glibc_unsigned_or_positive (__l) \ + && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ + (__s), (__osz))) \ diff --git a/SPECS/glibc.spec b/SPECS/glibc.spec index 628345e..dfd7f0c 100644 --- a/SPECS/glibc.spec +++ b/SPECS/glibc.spec @@ -1,6 +1,6 @@ %define glibcsrcdir glibc-2.28 %define glibcversion 2.28 -%define glibcrelease 201%{?dist} +%define glibcrelease 202%{?dist} # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -895,6 +895,7 @@ Patch700: glibc-rh2065588-13.patch Patch701: glibc-rh2072329.patch Patch702: glibc-rh1982608.patch Patch703: glibc-rh1961109.patch +Patch704: glibc-rh2086853.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2725,6 +2726,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon May 16 2022 Siddhesh Poyarekar - 2.28-202 +- Ensure that condition in __glibc_fortify is a constant (#2086853) + * Tue May 10 2022 Arjun Shankar - 2.28-201 - Add missing MACRON to EBCDIC character sets (#1961109)