Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package glibc for openSUSE:Factory checked in at 2023-02-09 16:21:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/glibc (Old) and /work/SRC/openSUSE:Factory/.glibc.new.4462 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "glibc" Thu Feb 9 16:21:23 2023 rev:272 rq:1063590 version:2.37 Changes: -------- --- /work/SRC/openSUSE:Factory/glibc/glibc.changes 2022-12-22 16:21:25.677461322 +0100 +++ /work/SRC/openSUSE:Factory/.glibc.new.4462/glibc.changes 2023-02-09 16:21:24.578157411 +0100 @@ -1,0 +2,25 @@ +Wed Feb 1 16:06:35 UTC 2023 - Andreas Schwab <[email protected]> + +- Update to glibc 2.37 + * The getent tool now supports the --no-addrconfig option + * The dynamic linker no longer loads shared objects from the "tls" + subdirectories on the library search path or the subdirectory that + corresponds to the AT_PLATFORM system name, or employs the legacy AT_HWCAP + search mechanism, which was deprecated in version 2.33 +- printf-grouping.patch: Account for grouping in printf width (BZ #30068) +- strftime-time64.patch: Use 64-bit time_t interfaces in strftime and + strptime (BZ #30053) +- glibcextract-compile-c-snippet.patch, sys-mount-kernel-definition.patch, + sys-mount-usage.patch, nscd-netlink-cache-invalidation.patch, + syslog-large-messages.patch, dlmopen-libc-early-init.patch, + ldd-vdso-dependency.patch, syslog-extra-whitespace.patch, + errlist-edeadlock.patch, makeflags.patch, get-nscd-addresses.patch, + x86-64-avx2-string-functions.patch, nscd-aicache.patch, + dl-debug-bindings.patch, floatn.patch: Removed + +------------------------------------------------------------------- +Tue Dec 27 12:24:54 UTC 2022 - Ludwig Nussel <[email protected]> + +- Remove reference to obsolete %usrmerged macro (boo#1206798) + +------------------------------------------------------------------- Old: ---- dl-debug-bindings.patch dlmopen-libc-early-init.patch errlist-edeadlock.patch floatn.patch get-nscd-addresses.patch glibc-2.36.tar.xz glibc-2.36.tar.xz.sig glibcextract-compile-c-snippet.patch ldd-vdso-dependency.patch makeflags.patch nscd-aicache.patch nscd-netlink-cache-invalidation.patch sys-mount-kernel-definition.patch sys-mount-usage.patch syslog-extra-whitespace.patch syslog-large-messages.patch x86-64-avx2-string-functions.patch New: ---- glibc-2.37.tar.xz glibc-2.37.tar.xz.sig printf-grouping.patch strftime-time64.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ glibc.spec ++++++ --- /var/tmp/diff_new_pack.Os7Vxl/_old 2023-02-09 16:21:26.226165900 +0100 +++ /var/tmp/diff_new_pack.Os7Vxl/_new 2023-02-09 16:21:26.230165921 +0100 @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -43,7 +43,7 @@ %define sysroot %{_prefix}/%{binutils_os}/sys-root %endif -%if 0%{?usrmerged} || 0%{?suse_version} >= 1550 +%if 0%{?suse_version} >= 1550 %bcond_without usrmerged %else %bcond_with usrmerged @@ -137,10 +137,10 @@ Summary: Standard Shared Libraries (from the GNU C Library) License: GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 Group: System/Libraries -Version: 2.36 +Version: 2.37 Release: 0 %if %{without snapshot} -%define git_id c804cd1c00 +%define git_id a704fd9a13 %define libversion %version %else %define git_id %(echo %version | sed 's/.*\.g//') @@ -280,36 +280,10 @@ ### # Patches from upstream ### -# PATCH-FIX-UPSTREAM glibcextract.py: Add compile_c_snippet -Patch1000: glibcextract-compile-c-snippet.patch -# PATCH-FIX-UPSTREAM linux: Mimic kernel definition for BLOCK_SIZE -Patch1001: sys-mount-kernel-definition.patch -# PATCH-FIX-UPSTREAM linux: Fix sys/mount.h usage with kernel headers -Patch1002: sys-mount-usage.patch -# PATCH-FIX-UPSTREAM nscd: Fix netlink cache invalidation if epoll is used (BZ #29415) -Patch1003: nscd-netlink-cache-invalidation.patch -# PATCH-FIX-UPSTREAM syslog: Fix large messages (CVE-2022-39046, BZ #29536) -Patch1004: syslog-large-messages.patch -# PATCH-FIX-UPSTREAM elf: Call __libc_early_init for reused namespaces (BZ #29528) -Patch1005: dlmopen-libc-early-init.patch -# PATCH-FIX-UPSTREAM elf: Restore how vDSO dependency is printed with LD_TRACE_LOADED_OBJECTS (BZ #29539) -Patch1006: ldd-vdso-dependency.patch -# PATCH-FIX-UPSTREAM syslog: Remove extra whitespace between timestamp and message (BZ #29544) -Patch1007: syslog-extra-whitespace.patch -# PATCH-FIX-UPSTREAM errlist: add missing entry for EDEADLOCK (BZ #29545) -Patch1008: errlist-edeadlock.patch -# PATCH-FIX-UPSTREAM Makerules: fix MAKEFLAGS assignment for upcoming make-4.4 (BZ# 29564) -Patch1009: makeflags.patch -# PATCH-FIX-UPSTREAM get_nscd_addresses: Fix subscript typos (BZ #29605) -Patch1010: get-nscd-addresses.patch -# PATCH-FIX-UPSTREAM check for required cpu features in AVX2 string functions (BZ #29611) -Patch1011: x86-64-avx2-string-functions.patch -# PATCH-FIX-UPSTREAM nscd: Drop local address tuple variable (BZ #29607) -Patch1012: nscd-aicache.patch -# PATCH-FIX-UPSTREAM elf: Reinstate on DL_DEBUG_BINDINGS _dl_lookup_symbol_x -Patch1013: dl-debug-bindings.patch -# PATCH-FIX-UPSTREAM Update _FloatN header support for C++ in GCC 13 -Patch1014: floatn.patch +# PATCH-FIX-UPSTREAM Account for grouping in printf width (BZ #30068) +Patch1000: printf-grouping.patch +# PATCH-FIX-UPSTREAM Use 64-bit time_t interfaces in strftime and strptime (BZ #30053) +Patch1001: strftime-time64.patch ### # Patches awaiting upstream approval @@ -536,19 +510,6 @@ %if %{without snapshot} %patch1000 -p1 %patch1001 -p1 -%patch1002 -p1 -%patch1003 -p1 -%patch1004 -p1 -%patch1005 -p1 -%patch1006 -p1 -%patch1007 -p1 -%patch1008 -p1 -%patch1009 -p1 -%patch1010 -p1 -%patch1011 -p1 -%patch1012 -p1 -%patch1013 -p1 -%patch1014 -p1 %endif %patch2000 -p1 @@ -932,10 +893,6 @@ install -m 644 %{SOURCE5} %{buildroot}/etc %endif -mkdir -p %{buildroot}%{_includedir}/resolv -install -m 0644 resolv/mapv4v6addr.h %{buildroot}%{_includedir}/resolv/ -install -m 0644 resolv/mapv4v6hostent.h %{buildroot}%{_includedir}/resolv/ - %if %{build_html} mkdir -p %{buildroot}%{_datadir}/doc/glibc cp -p cc-base/manual/libc/*.html %{buildroot}%{_datadir}/doc/glibc @@ -1060,7 +1017,7 @@ %else rm -f %{buildroot}%{_libdir}/lib*.a %endif -rm -f %{buildroot}%{_bindir}/{ld.so,ldd*,sprof} +rm -f %{buildroot}%{_bindir}/{ld.so,ldd,sprof} rm -rf %{buildroot}%{_mandir}/man* rm -rf %{buildroot}%{rootsbindir} %{buildroot}%{_includedir} %ifarch riscv64 @@ -1259,9 +1216,6 @@ %{_bindir}/getent %{_bindir}/iconv %attr(755,root,root) %{_bindir}/ldd -%ifarch %ix86 sparc sparcv9 m68k - %{_bindir}/lddlibc4 -%endif %{_bindir}/locale %{_bindir}/localedef %dir %attr(0755,root,root) %{_libexecdir}/getconf ++++++ _constraints ++++++ --- /var/tmp/diff_new_pack.Os7Vxl/_old 2023-02-09 16:21:26.274166148 +0100 +++ /var/tmp/diff_new_pack.Os7Vxl/_new 2023-02-09 16:21:26.278166168 +0100 @@ -6,7 +6,7 @@ </conditions> <hardware> <memory> - <size unit="M">2500</size> + <size unit="M">3000</size> </memory> <disk> <size unit="M">5600</size> ++++++ fix-locking-in-_IO_cleanup.patch ++++++ --- /var/tmp/diff_new_pack.Os7Vxl/_old 2023-02-09 16:21:26.334166457 +0100 +++ /var/tmp/diff_new_pack.Os7Vxl/_new 2023-02-09 16:21:26.334166457 +0100 @@ -144,7 +144,7 @@ --- glibc-2.32.orig/sysdeps/pthread/tst-stdio1.c +++ /dev/null @@ -1,55 +0,0 @@ --/* Copyright (C) 2002-2022 Free Software Foundation, Inc. +-/* Copyright (C) 2002-2023 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or ++++++ glibc-2.36.tar.xz -> glibc-2.37.tar.xz ++++++ /work/SRC/openSUSE:Factory/glibc/glibc-2.36.tar.xz /work/SRC/openSUSE:Factory/.glibc.new.4462/glibc-2.37.tar.xz differ: char 27, line 1 ++++++ glibc-version.diff ++++++ --- /var/tmp/diff_new_pack.Os7Vxl/_old 2023-02-09 16:21:26.406166828 +0100 +++ /var/tmp/diff_new_pack.Os7Vxl/_new 2023-02-09 16:21:26.410166848 +0100 @@ -8,7 +8,7 @@ static const char banner[] = -"GNU C Library "PKGVERSION RELEASE" release version "VERSION".\n\ +"GNU C Library "PKGVERSION RELEASE" release version "VERSION" (git "GITID").\n\ - Copyright (C) 2022 Free Software Foundation, Inc.\n\ + Copyright (C) 2023 Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ PARTICULAR PURPOSE.\n\ ++++++ printf-grouping.patch ++++++ >From c980549cc6a1c03c23cc2fe3e7b0fe626a0364b0 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell <[email protected]> Date: Thu, 19 Jan 2023 12:50:20 +0100 Subject: [PATCH] Account for grouping in printf width (bug 30068) This is a partial fix for mishandling of grouping when formatting integers. It properly computes the width in the presence of grouping characters when the width is larger than the number of significant digits. The precision related issue is documented in bug 23432. Co-authored-by: Andreas Schwab <[email protected]> --- stdio-common/Makefile | 2 ++ stdio-common/tst-grouping3.c | 54 +++++++++++++++++++++++++++++ stdio-common/vfprintf-process-arg.c | 22 +++++++++--- 3 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 stdio-common/tst-grouping3.c diff --git a/stdio-common/Makefile b/stdio-common/Makefile index 34fdd6d1f8..652d9e5f95 100644 --- a/stdio-common/Makefile +++ b/stdio-common/Makefile @@ -196,6 +196,7 @@ tests := \ tst-gets \ tst-grouping \ tst-grouping2 \ + tst-grouping3 \ tst-long-dbl-fphex \ tst-memstream-string \ tst-obprintf \ @@ -340,6 +341,7 @@ $(objpfx)tst-sscanf.out: $(gen-locales) $(objpfx)tst-swprintf.out: $(gen-locales) $(objpfx)tst-vfprintf-mbs-prec.out: $(gen-locales) $(objpfx)tst-vfprintf-width-i18n.out: $(gen-locales) +$(objpfx)tst-grouping3.out: $(gen-locales) endif tst-printf-bz18872-ENV = MALLOC_TRACE=$(objpfx)tst-printf-bz18872.mtrace \ diff --git a/stdio-common/tst-grouping3.c b/stdio-common/tst-grouping3.c new file mode 100644 index 0000000000..e9e39218e2 --- /dev/null +++ b/stdio-common/tst-grouping3.c @@ -0,0 +1,54 @@ +/* Test printf with grouping and padding (bug 30068) + Copyright (C) 2023 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#include <locale.h> +#include <stdio.h> +#include <support/check.h> +#include <support/support.h> + +static int +do_test (void) +{ + char buf[80]; + + xsetlocale (LC_NUMERIC, "de_DE.UTF-8"); + + /* The format string has the following conversion specifier: + ' - Use thousands grouping. + + - The result of a signed conversion shall begin with a sign. + - - Left justified. + 13 - Minimum 13 bytes of width. + 9 - Minimum 9 digits of precision. + + In bug 30068 the grouping characters were not accounted for in + the width, and were added after the fact resulting in a 15-byte + output instead of a 13-byte output. The two additional bytes + come from the locale-specific thousands separator. This increase + in size could result in a buffer overflow if a reasonable caller + calculated the size of the expected buffer using nl_langinfo to + determine the sie of THOUSEP in bytes. + + This bug is distinct from bug 23432 which has to do with the + minimum precision calculation (digit based). */ + sprintf (buf, "%+-'13.9d", 1234567); + TEST_COMPARE_STRING (buf, "+001.234.567 "); + + return 0; +} + +#include <support/test-driver.c> diff --git a/stdio-common/vfprintf-process-arg.c b/stdio-common/vfprintf-process-arg.c index 24c9125f9f..8c0fcbcf78 100644 --- a/stdio-common/vfprintf-process-arg.c +++ b/stdio-common/vfprintf-process-arg.c @@ -186,11 +186,17 @@ LABEL (unsigned_number): /* Unsigned number of base BASE. */ bool octal_marker = (prec <= number_length && number.word != 0 && alt && base == 8); - prec = MAX (0, prec - (workend - string)); + /* At this point prec_inc is the additional bytes required for the + specificed precision. It is 0 if the precision would not have + required additional bytes i.e. the number of input digits is more + than the precision. It is greater than zero if the precision is + more than the number of digits without grouping (precision only + considers digits). */ + unsigned int prec_inc = MAX (0, prec - (workend - string)); if (!left) { - width -= number_length + prec; + width -= number_length + prec_inc; if (number.word != 0 && alt && (base == 16 || base == 2)) /* Account for 0X, 0x, 0B or 0b hex or binary marker. */ @@ -221,7 +227,7 @@ LABEL (unsigned_number): /* Unsigned number of base BASE. */ Xprintf_buffer_putc (buf, spec); } - width += prec; + width += prec_inc; Xprintf_buffer_pad (buf, L_('0'), width); if (octal_marker) @@ -237,6 +243,8 @@ LABEL (unsigned_number): /* Unsigned number of base BASE. */ } else { + /* Perform left justification adjustments. */ + if (is_negative) { Xprintf_buffer_putc (buf, L_('-')); @@ -263,9 +271,13 @@ LABEL (unsigned_number): /* Unsigned number of base BASE. */ if (octal_marker) --width; - width -= workend - string + prec; + /* Adjust the width by subtracting the number of bytes + required to represent the number with grouping characters + (NUMBER_LENGTH) and any additional bytes required for + precision. */ + width -= number_length + prec_inc; - Xprintf_buffer_pad (buf, L_('0'), prec); + Xprintf_buffer_pad (buf, L_('0'), prec_inc); if (octal_marker) Xprintf_buffer_putc (buf, L_('0')); -- 2.39.1 ++++++ strftime-time64.patch ++++++ >From 41349f6f67c83e7bafe49f985b56493d2c4c9c77 Mon Sep 17 00:00:00 2001 From: Andreas Schwab <[email protected]> Date: Thu, 26 Jan 2023 14:25:05 +0100 Subject: [PATCH] Use 64-bit time_t interfaces in strftime and strptime (bug 30053) Both functions use time_t only internally, so the ABI is not affected. --- time/Makefile | 3 ++- time/strftime_l.c | 4 +++ time/strptime_l.c | 4 ++- time/tst-strftime4-time64.c | 1 + time/tst-strftime4.c | 52 +++++++++++++++++++++++++++++++++++++ 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 time/tst-strftime4-time64.c create mode 100644 time/tst-strftime4.c diff --git a/time/Makefile b/time/Makefile index d86f2105c5..92bc3db315 100644 --- a/time/Makefile +++ b/time/Makefile @@ -50,7 +50,7 @@ tests := test_time clocktest tst-posixtz tst-strptime tst_wcsftime \ tst-clock tst-clock2 tst-clock_nanosleep tst-cpuclock1 \ tst-adjtime tst-ctime tst-difftime tst-mktime4 tst-clock_settime \ tst-settimeofday tst-itimer tst-gmtime tst-timegm \ - tst-timespec_get tst-timespec_getres + tst-timespec_get tst-timespec_getres tst-strftime4 tests-time64 := \ tst-adjtime-time64 \ @@ -65,6 +65,7 @@ tests-time64 := \ tst-itimer-time64 \ tst-mktime4-time64 \ tst-settimeofday-time64 \ + tst-strftime4-time64 \ tst-timegm-time64 \ tst-timespec_get-time64 \ tst-timespec_getres-time64 \ diff --git a/time/strftime_l.c b/time/strftime_l.c index e09561c39c..402c6c4111 100644 --- a/time/strftime_l.c +++ b/time/strftime_l.c @@ -159,6 +159,10 @@ extern char *tzname[]; #ifdef _LIBC # define tzname __tzname # define tzset __tzset + +# define time_t __time64_t +# define __gmtime_r(t, tp) __gmtime64_r (t, tp) +# define mktime(tp) __mktime64 (tp) #endif #if !HAVE_TM_GMTOFF diff --git a/time/strptime_l.c b/time/strptime_l.c index 80fd705b8d..85c3249fcc 100644 --- a/time/strptime_l.c +++ b/time/strptime_l.c @@ -30,8 +30,10 @@ #ifdef _LIBC # define HAVE_LOCALTIME_R 0 # include "../locale/localeinfo.h" -#endif +# define time_t __time64_t +# define __localtime_r(t, tp) __localtime64_r (t, tp) +#endif #if ! HAVE_LOCALTIME_R && ! defined localtime_r # ifdef _LIBC diff --git a/time/tst-strftime4-time64.c b/time/tst-strftime4-time64.c new file mode 100644 index 0000000000..4d47ee7d79 --- /dev/null +++ b/time/tst-strftime4-time64.c @@ -0,0 +1 @@ +#include "tst-strftime4.c" diff --git a/time/tst-strftime4.c b/time/tst-strftime4.c new file mode 100644 index 0000000000..659716d0fa --- /dev/null +++ b/time/tst-strftime4.c @@ -0,0 +1,52 @@ +/* Test strftime and strptime after 2038-01-19 03:14:07 UTC (bug 30053). + Copyright (C) 2023 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#include <time.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <support/check.h> + +static int +do_test (void) +{ + TEST_VERIFY_EXIT (setenv ("TZ", "UTC0", 1) == 0); + tzset (); + if (sizeof (time_t) > 4) + { + time_t wrap = (time_t) 2147483648LL; + char buf[80]; + struct tm *tm = gmtime (&wrap); + TEST_VERIFY_EXIT (tm != NULL); + TEST_VERIFY_EXIT (strftime (buf, sizeof buf, "%s", tm) > 0); + puts (buf); + TEST_VERIFY (strcmp (buf, "2147483648") == 0); + + struct tm tm2; + char *p = strptime (buf, "%s", &tm2); + TEST_VERIFY_EXIT (p != NULL && *p == '\0'); + time_t t = mktime (&tm2); + printf ("%lld\n", (long long) t); + TEST_VERIFY (t == wrap); + } + else + FAIL_UNSUPPORTED ("32-bit time_t"); + return 0; +} + +#include <support/test-driver.c> -- 2.39.1
