forked from rpms/glibc
Auto-sync with upstream branch master
Upstream commit: 8a814e20d443adc460a1030fa1a66aa9ae817483 - Drop glibc-rh1732406.patch, fix for the regression applied upstream. - nptl: Use uintptr_t for address diagnostic in nptl/tst-pthread-getattr - Linux: Move getdents64 to <dirent.h> - test-container: Install with $(sorted-subdirs) (swbz#24794) - gconv: Check reference count in __gconv_release_cache (#1732406) - x86-64: Compile branred.c with -mprefer-vector-width=128 (swbz#24603) - build-many-glibcs.py: Use Linux 5.2 by default - Linux: Use in-tree copy of SO_ constants for !__USE_MISC (swbz#24532) - test-container: Avoid copying unintended system libraries
This commit is contained in:
parent
6144405435
commit
b3c6eb0e4c
@ -1,231 +0,0 @@
|
|||||||
Revert "libio: Fix gconv-related memory leak [BZ #24583]"
|
|
||||||
|
|
||||||
This reverts commit 7e740ab2e7be7d83b75513aa406e0b10875f7f9c.
|
|
||||||
|
|
||||||
It causes a regression:
|
|
||||||
|
|
||||||
https://sourceware.org/bugzilla/show_bug.cgi?id=24677
|
|
||||||
|
|
||||||
diff --git a/libio/Makefile b/libio/Makefile
|
|
||||||
index 6e594b8ec5fbca94..66ffab43201638ef 100644
|
|
||||||
--- a/libio/Makefile
|
|
||||||
+++ b/libio/Makefile
|
|
||||||
@@ -66,11 +66,7 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \
|
|
||||||
tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \
|
|
||||||
tst-ftell-append tst-fputws tst-bz22415 tst-fgetc-after-eof \
|
|
||||||
tst-sprintf-ub tst-sprintf-chk-ub tst-bz24051 tst-bz24153 \
|
|
||||||
- tst-wfile-sync tst-wfile-gconv
|
|
||||||
-
|
|
||||||
-# This test tests interaction with the gconv cache. Setting
|
|
||||||
-# GCONV_CACHE during out-of-container testing disables the cache.
|
|
||||||
-tests-container += tst-wfile-ascii
|
|
||||||
+ tst-wfile-sync
|
|
||||||
|
|
||||||
tests-internal = tst-vtables tst-vtables-interposed tst-readline
|
|
||||||
|
|
||||||
@@ -173,12 +169,10 @@ test-fmemopen-ENV = MALLOC_TRACE=$(objpfx)test-fmemopen.mtrace
|
|
||||||
tst-fopenloc-ENV = MALLOC_TRACE=$(objpfx)tst-fopenloc.mtrace
|
|
||||||
tst-bz22415-ENV = MALLOC_TRACE=$(objpfx)tst-bz22415.mtrace
|
|
||||||
tst-bz24228-ENV = MALLOC_TRACE=$(objpfx)tst-bz24228.mtrace
|
|
||||||
-tst-wfile-gconv-ENV = MALLOC_TRACE=$(objpfx)tst-wfile-gconv.mtrace
|
|
||||||
|
|
||||||
generated += test-fmemopen.mtrace test-fmemopen.check
|
|
||||||
generated += tst-fopenloc.mtrace tst-fopenloc.check
|
|
||||||
generated += tst-bz22415.mtrace tst-bz22415.check
|
|
||||||
-generated += tst-wfile-gconv.mtrace tst-wfile-gconv.check
|
|
||||||
|
|
||||||
aux := fileops genops stdfiles stdio strops
|
|
||||||
|
|
||||||
@@ -194,8 +188,7 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \
|
|
||||||
|
|
||||||
ifeq ($(run-built-tests),yes)
|
|
||||||
tests-special += $(objpfx)test-freopen.out $(objpfx)test-fmemopen-mem.out \
|
|
||||||
- $(objpfx)tst-bz22415-mem.out \
|
|
||||||
- $(objpfx)tst-wfile-gconv-mem.out
|
|
||||||
+ $(objpfx)tst-bz22415-mem.out
|
|
||||||
ifeq (yes,$(build-shared))
|
|
||||||
# Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared
|
|
||||||
# library is enabled since they depend on tst-fopenloc.out.
|
|
||||||
@@ -229,7 +222,6 @@ $(objpfx)tst-ungetwc2.out: $(gen-locales)
|
|
||||||
$(objpfx)tst-widetext.out: $(gen-locales)
|
|
||||||
$(objpfx)tst_wprintf2.out: $(gen-locales)
|
|
||||||
$(objpfx)tst-wfile-sync.out: $(gen-locales)
|
|
||||||
-$(objpfx)tst-wfile-gconv.out: $(gen-locales)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen
|
|
||||||
@@ -258,6 +250,3 @@ $(objpfx)tst-bz24228-mem.out: $(objpfx)tst-bz24228.out
|
|
||||||
$(common-objpfx)malloc/mtrace $(objpfx)tst-bz24228.mtrace > $@; \
|
|
||||||
$(evaluate-test)
|
|
||||||
|
|
||||||
-$(objpfx)tst-wfile-gconv-mem.out: $(objpfx)tst-wfile-gconv.out
|
|
||||||
- $(common-objpfx)malloc/mtrace $(objpfx)tst-wfile-gconv.mtrace > $@; \
|
|
||||||
- $(evaluate-test)
|
|
||||||
diff --git a/libio/iofclose.c b/libio/iofclose.c
|
|
||||||
index c03c6cf57cafd2bb..8a80dd0b78a50fce 100644
|
|
||||||
--- a/libio/iofclose.c
|
|
||||||
+++ b/libio/iofclose.c
|
|
||||||
@@ -26,8 +26,8 @@
|
|
||||||
|
|
||||||
#include "libioP.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
+#include "../iconv/gconv_int.h"
|
|
||||||
#include <shlib-compat.h>
|
|
||||||
-#include <wcsmbs/wcsmbsload.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
_IO_new_fclose (FILE *fp)
|
|
||||||
@@ -60,14 +60,11 @@ _IO_new_fclose (FILE *fp)
|
|
||||||
/* This stream has a wide orientation. This means we have to free
|
|
||||||
the conversion functions. */
|
|
||||||
struct _IO_codecvt *cc = fp->_codecvt;
|
|
||||||
- struct gconv_fcts conv =
|
|
||||||
- {
|
|
||||||
- .towc = cc->__cd_in.__cd.__steps,
|
|
||||||
- .towc_nsteps = cc->__cd_in.__cd.__nsteps,
|
|
||||||
- .tomb = cc->__cd_out.__cd.__steps,
|
|
||||||
- .tomb_nsteps = cc->__cd_out.__cd.__nsteps,
|
|
||||||
- };
|
|
||||||
- __wcsmbs_close_conv (&conv);
|
|
||||||
+
|
|
||||||
+ __libc_lock_lock (__gconv_lock);
|
|
||||||
+ __gconv_release_step (cc->__cd_in.__cd.__steps);
|
|
||||||
+ __gconv_release_step (cc->__cd_out.__cd.__steps);
|
|
||||||
+ __libc_lock_unlock (__gconv_lock);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
diff --git a/libio/tst-wfile-ascii.c b/libio/tst-wfile-ascii.c
|
|
||||||
deleted file mode 100644
|
|
||||||
index 7514289a7bb79339..0000000000000000
|
|
||||||
--- a/libio/tst-wfile-ascii.c
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,56 +0,0 @@
|
|
||||||
-/* Test ASCII gconv module followed by cache initialization.
|
|
||||||
- Copyright (C) 2019 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
|
|
||||||
- <http://www.gnu.org/licenses/>. */
|
|
||||||
-
|
|
||||||
-#include <stdlib.h>
|
|
||||||
-#include <support/check.h>
|
|
||||||
-#include <support/support.h>
|
|
||||||
-#include <support/xstdio.h>
|
|
||||||
-#include <wchar.h>
|
|
||||||
-
|
|
||||||
-static int
|
|
||||||
-do_test (void)
|
|
||||||
-{
|
|
||||||
- /* The test-in-container framework sets these environment variables.
|
|
||||||
- The presence of GCONV_PATH invalidates this test. */
|
|
||||||
- unsetenv ("GCONV_PATH");
|
|
||||||
- unsetenv ("LOCPATH");
|
|
||||||
-
|
|
||||||
- /* Create the gconv module cache. iconvconfig is in /sbin, which is
|
|
||||||
- not on PATH. */
|
|
||||||
- {
|
|
||||||
- char *iconvconfig = xasprintf ("%s/iconvconfig", support_sbindir_prefix);
|
|
||||||
- TEST_COMPARE (system (iconvconfig), 0);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- /* Use built-in ASCII gconv module, without triggering cache
|
|
||||||
- initialization. */
|
|
||||||
- FILE *fp1 = xfopen ("/dev/zero", "r");
|
|
||||||
- TEST_COMPARE (fwide (fp1, 1), 1);
|
|
||||||
-
|
|
||||||
- /* Use non-ASCII gconv module and trigger gconv cache
|
|
||||||
- initialization. */
|
|
||||||
- FILE *fp2 = xfopen ("/dev/zero", "r,ccs=UTF-8");
|
|
||||||
- TEST_COMPARE (fwide (fp2, 0), 1);
|
|
||||||
-
|
|
||||||
- xfclose (fp1);
|
|
||||||
- xfclose (fp2);
|
|
||||||
-
|
|
||||||
- return 0;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-#include <support/test-driver.c>
|
|
||||||
diff --git a/libio/tst-wfile-gconv.c b/libio/tst-wfile-gconv.c
|
|
||||||
deleted file mode 100644
|
|
||||||
index de603b32d2a1a58b..0000000000000000
|
|
||||||
--- a/libio/tst-wfile-gconv.c
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,36 +0,0 @@
|
|
||||||
-/* Test that non-built-in gconv modules do not cause memory leak (bug 24583).
|
|
||||||
- Copyright (C) 2019 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
|
|
||||||
- <http://www.gnu.org/licenses/>. */
|
|
||||||
-
|
|
||||||
-#include <locale.h>
|
|
||||||
-#include <mcheck.h>
|
|
||||||
-#include <support/check.h>
|
|
||||||
-#include <support/xstdio.h>
|
|
||||||
-
|
|
||||||
-static int
|
|
||||||
-do_test (void)
|
|
||||||
-{
|
|
||||||
- mtrace ();
|
|
||||||
-
|
|
||||||
- TEST_VERIFY_EXIT (setlocale (LC_ALL, "ja_JP.EUC-JP") != NULL);
|
|
||||||
- xfclose (xfopen ("/etc/passwd", "r,ccs=UTF-8"));
|
|
||||||
- xfclose (xfopen ("/etc/passwd", "r"));
|
|
||||||
-
|
|
||||||
- return 0;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-#include <support/test-driver.c>
|
|
||||||
diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c
|
|
||||||
index 840d4abc440e1076..6648365d822bc167 100644
|
|
||||||
--- a/wcsmbs/wcsmbsload.c
|
|
||||||
+++ b/wcsmbs/wcsmbsload.c
|
|
||||||
@@ -279,13 +279,3 @@ _nl_cleanup_ctype (struct __locale_data *locale)
|
|
||||||
free ((char *) data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-
|
|
||||||
-/* Free the specified conversion functions (but not CONV itself). */
|
|
||||||
-void
|
|
||||||
-__wcsmbs_close_conv (struct gconv_fcts *conv)
|
|
||||||
-{
|
|
||||||
- if (conv->towc != &to_wc)
|
|
||||||
- __gconv_close_transform (conv->towc, conv->towc_nsteps);
|
|
||||||
- if (conv->tomb != &to_mb)
|
|
||||||
- __gconv_close_transform (conv->tomb, conv->tomb_nsteps);
|
|
||||||
-}
|
|
||||||
diff --git a/wcsmbs/wcsmbsload.h b/wcsmbs/wcsmbsload.h
|
|
||||||
index c2fffbd914f663e6..6ccad4b3ba62b500 100644
|
|
||||||
--- a/wcsmbs/wcsmbsload.h
|
|
||||||
+++ b/wcsmbs/wcsmbsload.h
|
|
||||||
@@ -51,7 +51,6 @@ extern int __wcsmbs_named_conv (struct gconv_fcts *copy, const char *name)
|
|
||||||
/* Function used for the `private.cleanup' hook. */
|
|
||||||
extern void _nl_cleanup_ctype (struct __locale_data *) attribute_hidden;
|
|
||||||
|
|
||||||
-extern void __wcsmbs_close_conv (struct gconv_fcts *conv) attribute_hidden;
|
|
||||||
|
|
||||||
#include <iconv/gconv_int.h>
|
|
||||||
|
|
18
glibc.spec
18
glibc.spec
@ -1,4 +1,4 @@
|
|||||||
%define glibcsrcdir glibc-2.29.9000-402-gdcf36bcad3
|
%define glibcsrcdir glibc-2.29.9000-411-g8a814e20d4
|
||||||
%define glibcversion 2.29.9000
|
%define glibcversion 2.29.9000
|
||||||
# Pre-release tarballs are pulled in from git using a command that is
|
# Pre-release tarballs are pulled in from git using a command that is
|
||||||
# effectively:
|
# effectively:
|
||||||
@ -87,7 +87,7 @@
|
|||||||
Summary: The GNU libc libraries
|
Summary: The GNU libc libraries
|
||||||
Name: glibc
|
Name: glibc
|
||||||
Version: %{glibcversion}
|
Version: %{glibcversion}
|
||||||
Release: 35%{?dist}
|
Release: 36%{?dist}
|
||||||
|
|
||||||
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
|
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
|
||||||
# libraries.
|
# libraries.
|
||||||
@ -159,7 +159,6 @@ Patch28: glibc-rh1615608.patch
|
|||||||
# In progress upstream submission for nscd.conf changes:
|
# In progress upstream submission for nscd.conf changes:
|
||||||
# https://www.sourceware.org/ml/libc-alpha/2019-03/msg00436.html
|
# https://www.sourceware.org/ml/libc-alpha/2019-03/msg00436.html
|
||||||
Patch31: glibc-fedora-nscd-warnings.patch
|
Patch31: glibc-fedora-nscd-warnings.patch
|
||||||
Patch32: glibc-rh1732406.patch
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Continued list of core "glibc" package information:
|
# Continued list of core "glibc" package information:
|
||||||
@ -2016,6 +2015,19 @@ fi
|
|||||||
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
|
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 30 2019 Florian Weimer <fweimer@redhat.com> - 2.29.9000-36
|
||||||
|
- Drop glibc-rh1732406.patch, fix for the regression applied upstream.
|
||||||
|
- Auto-sync with upstream branch master,
|
||||||
|
commit 8a814e20d443adc460a1030fa1a66aa9ae817483:
|
||||||
|
- nptl: Use uintptr_t for address diagnostic in nptl/tst-pthread-getattr
|
||||||
|
- Linux: Move getdents64 to <dirent.h>
|
||||||
|
- test-container: Install with $(sorted-subdirs) (swbz#24794)
|
||||||
|
- gconv: Check reference count in __gconv_release_cache (#1732406)
|
||||||
|
- x86-64: Compile branred.c with -mprefer-vector-width=128 (swbz#24603)
|
||||||
|
- build-many-glibcs.py: Use Linux 5.2 by default
|
||||||
|
- Linux: Use in-tree copy of SO_ constants for !__USE_MISC (swbz#24532)
|
||||||
|
- test-container: Avoid copying unintended system libraries
|
||||||
|
|
||||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org>
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org>
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (glibc-2.29.9000-402-gdcf36bcad3.tar.xz) = f61e3755b54ab50c2be711c2b74773b8e76df336be975881e4201ca04866d721c756b93ff3b420a1c5bb9173d7748d545cb4f37c7f913c73cd14d48fa75d7671
|
SHA512 (glibc-2.29.9000-411-g8a814e20d4.tar.xz) = b9ae6b07270121f77a5350ee6b848499239289aaa93b552e87b6e2eaf165e6042880ae096b3093bcc571fa265756014a4420f09793a1121c588aae85dff5e38e
|
||||||
|
Loading…
Reference in New Issue
Block a user