Auto-sync with upstream master

Upstream commit: 9032070deaa03431921315f973c548c2c403fecc
This commit is contained in:
Florian Weimer 2016-11-02 12:06:16 +01:00
parent 55bd1b5cdd
commit 573bcacc8f
4 changed files with 12 additions and 74 deletions

View File

@ -6962,37 +6962,3 @@ Index: glibc-2.24-256-g5140d03/sysdeps/x86/bits/pthreadtypes.h
} __data;
char __size[__SIZEOF_PTHREAD_COND_T];
__extension__ long long int __align;
Index: glibc-2.24-256-g5140d03/include/atomic.h
===================================================================
--- glibc-2.24-256-g5140d03.orig/include/atomic.h
+++ glibc-2.24-256-g5140d03/include/atomic.h
@@ -777,18 +777,22 @@ void __atomic_link_error (void);
# endif
# ifndef atomic_fetch_xor_release
+/* Failing the atomic_compare_exchange_weak_release reloads the value in
+ __atg104_expected, so we need only do the XOR again and retry. */
# define atomic_fetch_xor_release(mem, operand) \
- ({ __typeof (*(mem)) __atg104_old; \
- __typeof (mem) __atg104_memp = (mem); \
+ ({ __typeof (mem) __atg104_memp = (mem); \
+ __typeof (*(mem)) __atg104_expected = (*__atg104_memp); \
+ __typeof (*(mem)) __atg104_desired; \
__typeof (*(mem)) __atg104_op = (operand); \
\
do \
- __atg104_old = (*__atg104_memp); \
- while (__builtin_expect \
- (atomic_compare_and_exchange_bool_rel ( \
- __atg104_memp, __atg104_old ^ __atg104_op, __atg104_old), 0));\
+ __atg104_desired = __atg104_expected ^ __atg104_op; \
+ while (__glibc_unlikely \
+ (atomic_compare_exchange_weak_release ( \
+ __atg104_memp, &__atg104_expected, __atg104_desired) \
+ == 0)); \
\
- __atg104_old; })
+ __atg104_expected; })
#endif
#endif /* !USE_ATOMIC_COMPILER_BUILTINS */

View File

@ -1,33 +0,0 @@
Bug 20019 - NULL pointer dereference in libc.so.6 IFUNC due to uninitialized GOT
Prototype patch by H.J. Lu <hjl.tools@gmail.com> to error
out when IFUNC being resolved is for another map that hasn't
yet been relocated.
--- a/sysdeps/x86_64/dl-machine.h
+++ a/sysdeps/x86_64/dl-machine.h
@@ -331,7 +331,23 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
0)
&& __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
&& __builtin_expect (!skip_ifunc, 1))
- value = ((ElfW(Addr) (*) (void)) value) ();
+ {
+# ifndef RTLD_BOOTSTRAP
+ if (sym_map != map
+ && sym_map->l_type != lt_executable
+ && !sym_map->l_relocated)
+ {
+ const char *strtab
+ = (const char *) D_PTR (map, l_info[DT_STRTAB]);
+ _dl_fatal_printf ("\
+%s: Relink `%s' with `%s' for IFUNC symbol `%s'\n",
+ RTLD_PROGNAME, map->l_name,
+ sym_map->l_name,
+ strtab + refsym->st_name);
+ }
+#endif
+ value = ((ElfW(Addr) (*) (void)) value) ();
+ }
switch (r_type)
{

View File

@ -1,4 +1,4 @@
%define glibcsrcdir glibc-2.24-285-ge37208c
%define glibcsrcdir glibc-2.24-326-g9032070
%define glibcversion 2.24.90
%define glibcrelease 14%{?dist}
# Pre-release tarballs are pulled in from git using a command that is
@ -262,10 +262,6 @@ Patch0059: glibc-c-utf8-locale.patch
# Build libcrypt twice, with and without NSS.
Patch0060: glibc-rh1324623.patch
# Bug 20019: Prototype patch to error on resolution of IFUNC
# for an uninitialized library.
Patch0061: glibc-swbz20019.patch
# Bug 13165: New condvar implementation.
Patch0062: glibc-swbz13165.patch
@ -886,7 +882,6 @@ microbenchmark tests on the system.
%patch2037 -p1
%patch2110 -p1
%patch2112 -p1
%patch0061 -p1
%patch0062 -p1
##############################################################################
@ -2283,7 +2278,17 @@ rm -f *.filelist*
%changelog
* Wed Nov 2 2016 Florian Weimer <fweimer@redhat.com> - 2.24.90-14
- Drop glibc-swbz20019.patch, applied upstream.
- dlerror returns NULL after dlsym (RTLD_NEXT) lookup failure (#1333945)
(fixed by dropping the revert)
- Auto-sync with upstream master,
commit 9032070deaa03431921315f973c548c2c403fecc, fixing:
- Correct clog10 documentation (swbz#19673)
- Fix building with -Os (swbz#20729)
- Properly initialize glob structure with GLOB_BRACE|GLOB_DOOFFS (swbz#20707)
- powerpc: Fix TOC stub on powerpc64 clone (swbz#20728)
- math: Make strtod raise "inexact" exceptions (swbz#19380)
- malloc: Remove malloc_get_state, malloc_set_state (swbz#19473)
* Sat Oct 22 2016 Florian Weimer <fweimer@redhat.com> - 2.24.90-13
- Auto-sync with upstream master,

View File

@ -1 +1 @@
4e8be90de20aca6d2006446912e650b7 glibc-2.24-285-ge37208c.tar.gz
32a43429845ef683459fda4c91603062 glibc-2.24-326-g9032070.tar.gz