Auto-sync with upstream release/2.26/master
Upstream commit: 2aa1a7a8f8b9b7879bc6eb1c34d1580f992c406d - Disable SSE2 usage on i686 (#1471427) - assert: Suppress pedantic warning caused by statement expression (swbz#21242) - malloc: Avoid optimizer warning with GCC 7 and -O3 (#1470060) - nss: Call __resolv_context_put before early return in get*_r (swbz#21932) - x86-64: Use _dl_runtime_resolve_opt only with AVX512F (swbz#21871) - getaddrinfo: Release resolver context on error in gethosts (swbz#21885)
This commit is contained in:
parent
72775d1371
commit
3f68e5fe05
@ -67,7 +67,6 @@ bg_BG.UTF-8/UTF-8 \
|
||||
bg_BG/CP1251 \
|
||||
bhb_IN.UTF-8/UTF-8 \
|
||||
bho_IN/UTF-8 \
|
||||
bho_NP/UTF-8 \
|
||||
bi_VU/UTF-8 \
|
||||
bn_BD/UTF-8 \
|
||||
bn_IN/UTF-8 \
|
||||
|
@ -1,48 +0,0 @@
|
||||
Upstream thread:
|
||||
|
||||
https://sourceware.org/ml/libc-alpha/2017-07/msg00487.html
|
||||
|
||||
Relevant analysis:
|
||||
|
||||
_int_malloc is inlined into tcache_init, and the allocation size is
|
||||
constant-propagated into it. GCC does not realize that global_max_fast
|
||||
is limited MAX_FAST_SIZE, so it compiles the true branch of the if
|
||||
statement:
|
||||
|
||||
if ((unsigned long) (nb) <= (unsigned long) (get_max_fast ()))
|
||||
{
|
||||
idx = fastbin_index (nb);
|
||||
mfastbinptr *fb = &fastbin (av, idx);
|
||||
mchunkptr pp = *fb;
|
||||
REMOVE_FB (fb, victim, pp);
|
||||
if (victim != 0)
|
||||
|
||||
under the assumption that nb == sizeof (tcache_perthread_struct) == 576,
|
||||
which is larger than MAX_FAST_SIZE, so the fastbin access is compiled
|
||||
into an OOB array subscript. GCC does not proceed to eliminate this
|
||||
code, even though it has undefined behavior and will never execute in
|
||||
practice.
|
||||
|
||||
This is neither a glibc bug nor a GCC bug. It merely reflects the
|
||||
difficulty of producing good warnings from optimizers. But it does
|
||||
break the build in rawhide due to -Werror.
|
||||
|
||||
Index: b/malloc/malloc.c
|
||||
===================================================================
|
||||
--- a/malloc/malloc.c
|
||||
+++ b/malloc/malloc.c
|
||||
@@ -3566,6 +3566,14 @@ _int_malloc (mstate av, size_t bytes)
|
||||
while ((pp = catomic_compare_and_exchange_val_acq (fb, victim->fd, victim)) \
|
||||
!= victim); \
|
||||
|
||||
+ /* _int_malloc can be inlined to a caller with a constant size
|
||||
+ argument. In this case, the compiler will see an out-of-bounds
|
||||
+ array access in the true branch of the if statement below if it
|
||||
+ cannot show that global_max_fast cannot be larger than
|
||||
+ MAX_FAST_SIZE. The assert shows the compiler that this cannot
|
||||
+ happen. */
|
||||
+ assert (!__builtin_constant_p (nb) || global_max_fast <= MAX_FAST_SIZE);
|
||||
+
|
||||
if ((unsigned long) (nb) <= (unsigned long) (get_max_fast ()))
|
||||
{
|
||||
idx = fastbin_index (nb);
|
19
glibc.spec
19
glibc.spec
@ -1,6 +1,6 @@
|
||||
%define glibcsrcdir glibc-2.26-19-g2aad4b0
|
||||
%define glibcsrcdir glibc-2.26-8-g2aa1a7a8f8
|
||||
%define glibcversion 2.26
|
||||
%define glibcrelease 1%{?dist}
|
||||
%define glibcrelease 2%{?dist}
|
||||
# Pre-release tarballs are pulled in from git using a command that is
|
||||
# effectively:
|
||||
#
|
||||
@ -140,7 +140,7 @@
|
||||
Summary: The GNU libc libraries
|
||||
Name: glibc
|
||||
Version: %{glibcversion}
|
||||
Release: %{glibcrelease}.1
|
||||
Release: %{glibcrelease}
|
||||
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
|
||||
# Things that are linked directly into dynamically linked programs
|
||||
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
|
||||
@ -282,8 +282,6 @@ Patch2037: glibc-rh1315108.patch
|
||||
# sln implemented by ldconfig, to conserve disk space.
|
||||
Patch2112: glibc-rh1315476-2.patch
|
||||
|
||||
Patch2114: glibc-rh1470060.patch
|
||||
|
||||
##############################################################################
|
||||
# End of glibc patches.
|
||||
##############################################################################
|
||||
@ -829,7 +827,6 @@ microbenchmark tests on the system.
|
||||
%patch0060 -p1
|
||||
%patch2037 -p1
|
||||
%patch2112 -p1
|
||||
%patch2114 -p1
|
||||
%patch0061 -p1
|
||||
|
||||
##############################################################################
|
||||
@ -2243,6 +2240,16 @@ rm -f *.filelist*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Aug 16 2017 Florian Weimer <fweimer@redhat.com> - 2.26-2
|
||||
- Disable SSE2 usage on i686 (#1471427)
|
||||
- Auto-sync with upstream release/2.26/master,
|
||||
commit 2aa1a7a8f8b9b7879bc6eb1c34d1580f992c406d:
|
||||
- assert: Suppress pedantic warning caused by statement expression (swbz#21242)
|
||||
- malloc: Avoid optimizer warning with GCC 7 and -O3 (#1470060)
|
||||
- nss: Call __resolv_context_put before early return in get*_r (swbz#21932)
|
||||
- x86-64: Use _dl_runtime_resolve_opt only with AVX512F (swbz#21871)
|
||||
- getaddrinfo: Release resolver context on error in gethosts (swbz#21885)
|
||||
|
||||
* Thu Aug 03 2017 Carlos O'Donell <carlos@systemhalted.org> - 2.26-1
|
||||
- Update to released glibc 2.26.
|
||||
- Auto-sync with upstream master,
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (glibc-2.26-19-g2aad4b0.tar.gz) = b9c20cbc76594a2392963aee47e457a0b0aa1c3ee9fb3a8e1ccc685176ada0b12ed51e855fc155c7395e62bd3e5799aa3650f6039eaf85b96c3a8465c43295a7
|
||||
SHA512 (glibc-2.26-8-g2aa1a7a8f8.tar.gz) = a9ae08d51eb42d3f1ae1b8b65a6ae49cd8a4baa06cbeffdd53157206d1870b1c29f00f4c0de95ab10b66fde7096d63a9f7525e72a7e57508ddcec236a18d2ce7
|
||||
|
Loading…
Reference in New Issue
Block a user