summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-02-18Update version.h and include/features.h for 2.23 releaseglibc-2.23Adhemerval Zanella
2016-02-18Update NEWS with fixed bugs for 2.23 releaseAdhemerval Zanella
2016-02-18Add _STRING_INLINE_unaligned and string_private.hH.J. Lu
As discussed in https://sourceware.org/ml/libc-alpha/2015-10/msg00403.html the setting of _STRING_ARCH_unaligned currently controls the external GLIBC ABI as well as selecting the use of unaligned accesses withing GLIBC. Since _STRING_ARCH_unaligned was recently changed for AArch64, this would potentially break the ABI in GLIBC 2.23, so split the uses and add _STRING_INLINE_unaligned to select the string ABI. This setting must be fixed for each target, while _STRING_ARCH_unaligned may be changed from release to release. _STRING_ARCH_unaligned is used unconditionally in glibc. But <bits/string.h>, which defines _STRING_ARCH_unaligned, isn't included with -Os. Since _STRING_ARCH_unaligned is internal to glibc and may change between glibc releases, it should be made private to glibc. _STRING_ARCH_unaligned should defined in the new string_private.h heade file which is included unconditionally from internal <string.h> for glibc build. [BZ #19462] * bits/string.h (_STRING_ARCH_unaligned): Renamed to ... (_STRING_INLINE_unaligned): This. * include/string.h: Include <string_private.h>. * string/bits/string2.h: Replace _STRING_ARCH_unaligned with _STRING_INLINE_unaligned. * sysdeps/aarch64/bits/string.h (_STRING_ARCH_unaligned): Removed. (_STRING_INLINE_unaligned): New. * sysdeps/aarch64/string_private.h: New file. * sysdeps/generic/string_private.h: Likewise. * sysdeps/m68k/m680x0/m68020/string_private.h: Likewise. * sysdeps/s390/string_private.h: Likewise. * sysdeps/x86/string_private.h: Likewise. * sysdeps/m68k/m680x0/m68020/bits/string.h (_STRING_ARCH_unaligned): Renamed to ... (_STRING_INLINE_unaligned): This. * sysdeps/s390/bits/string.h (_STRING_ARCH_unaligned): Renamed to ... (_STRING_INLINE_unaligned): This. * sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Renamed to ... (_STRING_INLINE_unaligned): This. * sysdeps/x86/bits/string.h (_STRING_ARCH_unaligned): Renamed to ... (_STRING_INLINE_unaligned): This.
2016-02-18NEWS: List additional fixed security bugsFlorian Weimer
2016-02-17Use PIC relocation in ALIAS_IMPLAndrew Senkevich
Since libmvec_nonshared.a may be linked into shared objects, ALIAS_IMPL should use PIC relocation. [BZ #19590] * sysdeps/x86_64/fpu/svml_finite_alias.S (ALIAS_IMPL): Use PIC relocation.
2016-02-16CVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug 18665).Carlos O'Donell
* A stack-based buffer overflow was found in libresolv when invoked from libnss_dns, allowing specially crafted DNS responses to seize control of execution flow in the DNS client. The buffer overflow occurs in the functions send_dg (send datagram) and send_vc (send TCP) for the NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC family. The use of AF_UNSPEC triggers the low-level resolver code to send out two parallel queries for A and AAAA. A mismanagement of the buffers used for those queries could result in the response of a query writing beyond the alloca allocated buffer created by _nss_dns_gethostbyname4_r. Buffer management is simplified to remove the overflow. Thanks to the Google Security Team and Red Hat for reporting the security impact of this issue, and Robert Holiday of Ciena for reporting the related bug 18665. (CVE-2015-7547) See also: https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html https://sourceware.org/ml/libc-alpha/2016-02/msg00418.html
2016-02-14Update INSTALL with latest versions tested to work.Carlos O'Donell
2016-02-14Ensure isinff, isinfl, isnanf, and isnanl are defined (Bug 19439)Carlos O'Donell
In ICO C++11 mode ensure that isinff, isinfl, isnanf, and isnanl are defined. These functions were accidentally removed from the header as part of commit d9b965fa56350d6eea9f7f438a0714c7ffbb183f, but being GNU extensions, they should have been left in place.
2016-02-12Revert "ChangeLogs: convert to utf-8"Mike Frysinger
This reverts commit d2bb040b2a2f58b1ef80f01292bd722fce01d36a. It seems some files (like tst-regex) directly parse these and rely on some of its content *not* being UTF-8. Until we can fix thoses tests (and isolate them from ChangeLog updates), back out this change. It also shouldn't really have landed during the freeze.
2016-02-12hsearch_r: Apply VM size limit in test caseFlorian Weimer
2016-02-11[ARM] add missing -funwind-tables to test case (bug 19529)Szabolcs Nagy
stdlib/tst-makecontext test failed on arm because it used backtrace without -funwind-tables.
2016-02-08ChangeLogs: convert to utf-8Paul Eggert
2016-02-08localedata: convert all files to utf-8Mike Frysinger
The comments were using various encodings like ISO-8859-1. Convert them all over to UTF-8.
2016-02-04powerpc: Regenerate libm-test-ulpsRajalakshmi Srinivasaraghavan
2016-02-01Fix MIPS mmap negative offset handling for consistency (bug 19550).Joseph Myers
The handling of negative offsets in MIPS mmap is inconsistent with other architectures, as shown by failure of the test posix/tst-mmap-offset for o32 and n32. The MIPS mmap syscall uses a signed argument and does a signed arithmetic shift on it, whereas the glibc semantics expected by that test are for the offset to be considered as a large positive offset. This patch makes MIPS consistent with other architectures as far as possible by using the mmap2 syscall on o32 (#including the generic implementation), and making mmap not an alias for mmap64 for n32, with a custom implementation for n32 that zero-extends the offset argument to 64-bit before calling the mmap syscall. Tested for MIPS64 (o32, n32, n64). [BZ #19550] * sysdeps/unix/sysv/linux/mips/mips32/mmap.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/mmap64.c: Move to .... * sysdeps/unix/sysv/linux/mips/mips64/n64/mmap64.c: ... here. * sysdeps/unix/sysv/linux/mips/mips64/n32/mmap.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (mmap64): New syscall entry. * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (mmap): New syscall entry. * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (mmap): Remove syscall entry.
2016-01-31Revert "elf/elf.h: Add new 386 and X86_64 relocations from binutils."Mark Wielaard
This reverts commit 3da75f08818fa3d217e5d566477c7001cb774792. glibc 2.23 hard freeze doesn't allow this change at this time.
2016-01-31elf/elf.h: Add new 386 and X86_64 relocations from binutils.Mark Wielaard
The following new 386 and X86_64 were added to binutils. They are non-dynamic relocations, so don't need direct handling in glibc. But other programs, like elfutils, use the glibc elf.h definitions for the names and numbers when inspecting ET_REL files. R_386_GOT32X was proposed in https://groups.google.com/forum/#!topic/ia32-abi/GbJJskkid4I X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX were proposed in https://groups.google.com/forum/#!topic/x86-64-abi/n9AWHogmVY0 There also used to be R_X86_64_PC32_BND and R_X86_64_PLT32_BND but those already got deprecated in https://groups.google.com/d/msg/x86-64-abi/-hdQyMixt8Y/XFDOvioG85cJ * elf/elf.h (R_386_GOT32X): New. (R_386_NUM): Update. (R_X86_64_GOTPCRELX: New. (R_X86_64_REX_GOTPCRELX): New. (R_X86_64_NUM): Update.
2016-01-28Improve check against integer wraparound in hcreate_r [BZ #18240]Florian Weimer
2016-01-28Fix MIPS64 memcpy regression.Steve Ellcey
The MIPS memcpy optimizations at <https://sourceware.org/ml/libc-alpha/2015-10/msg00597.html> introduced a bug causing many string function tests to fail with segfaults for n32 and n64: FAIL: string/stratcliff FAIL: string/test-bcopy FAIL: string/test-memccpy FAIL: string/test-memcmp FAIL: string/test-memcpy FAIL: string/test-memmove FAIL: string/test-mempcpy FAIL: string/test-stpncpy FAIL: string/test-strncmp FAIL: string/test-strncpy (Some failures in other directories could also be caused by this bug.) The problem is that after the check for whether a word of input is left that can be copied as a word before moving to byte copies, a load can occur in the branch delay slot, resulting in a segfault if we are at the end of a page and the following page is unmapped. I don't see how this would have passed the tests as reported in the original patch posting (different kernel configurations affecting the code setting up unmapped pages, maybe?), since the tests in question don't appear to have changed recently. This patch moves a later instruction into the delay slot, as suggested at <https://sourceware.org/ml/libc-alpha/2016-01/msg00584.html>. Tested for n32 and n64. 2016-01-28 Steve Ellcey <sellcey@imgtec.com> Joseph Myers <joseph@codesourcery.com> * sysdeps/mips/memcpy.S (MEMCPY_NAME) [USE_DOUBLE]: Avoid word load in branch delay slot when less than a word of input left.
2016-01-27Remove unused variablesAndreas Schwab
They are flagged by -Wunused-const-variable.
2016-01-26Update localplt.data for 32-bit sparc.David S. Miller
* sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data: Add _Q_cmp.
2016-01-25Define __sqrtl_finite on sparc 32-bit with correct symbol version.David S. Miller
* sysdeps/sparc/sparc32/Versions (GLIBC_2.23): Add entry for __sqrtl_finite. * sysdeps/sparc/sparc32/fpu/e_sqrtl.c (__sqrtl_finite): Define instead using versioned_symbol. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Fix ordering of entries.
2016-01-25Adjust sparc 32-bit __sqrtl_finite version tag.David S. Miller
* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Move __sqrtl_finite to GLIBC_2.23
2016-01-25Update Alpha libm-test-ulpsRichard Henderson
2016-01-25Don't do lock elision on an error checking mutex (bug 17514)Andreas Schwab
Error checking mutexes are not supposed to be subject to lock elision. That would defeat the error checking nature of the mutex because lock elision doesn't record ownership.
2016-01-25Cleanup ppc bits/ipc.hPaul E. Murphy
Ages ago (commit e9dcb08) the ipc syscalls were inlined and eventually abstracted away any need for direct __ipc calls.
2016-01-25S390: Fix build failure in test string/tst-endian.c with gcc 6.Stefan Liebler
Building string/tst-endian.c with gcc 6 produces an build warning/error on s390 (big endian machine): gcc tst-endian.c -c -std=gnu11 -fgnu89-inline -O2 or -O3 ... tst-endian.c: In function ‘do_test’: tst-endian.c:16:30: error: self-comparison always evaluates to false [-Werror=tautological-compare] if (htobe16 (be16toh (i)) != i) ^~ ... See definitions of htobexx, bexxtoh in string/endian.h: ... This patch silences these warnings with DIAG_* macros if build with gcc 6 and newer. The same warnings occur on little endian machines with the "htoleXX (leXXtoh (i)) != i" if-statements. ChangeLog: * string/tst-endian.c: Include <libc-internal.h>. (do_test): Ignore tautological-compare warnings around "htobeXX (beXXtoh (i)) != i" and "htoleXX (leXXtoh (i)) != i" if-statements.
2016-01-24Fix missing __sqrtl_finite symbol in libm on sparc 32-bit.David S. Miller
* sysdeps/sparc/sparc32/fpu/e_sqrtl.c: New file. * sysdeps/sparc/sparc32/soft-fp/q_sqrt.c (__ieee754_sqrtl): Remove alias. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Add __sqrtl_finite.
2016-01-24Update sparc ULPS.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2016-01-25MIPS: Set the required Linux kernel version to 4.5.0 for 2008 NaNMaciej W. Rozycki
Complement the addition of the required kernel support, present upstream as from commit 2b5e869ecfcb3112f7e1267cb0328f3ff6d49b18 ("MIPS: ELF: Interpret the NAN2008 file header flag") and released with Linux 4.5-rc1 on Jan 24th, 2016. * sysdeps/unix/sysv/linux/mips/configure.ac: Set `arch_minimum_kernel' to 4.5.0 if 2008 NaN encoding is used. * sysdeps/unix/sysv/linux/mips/configure: Regenerate.
2016-01-22Fix nptl/tst-setuid3.cPaul E. Murphy
pthread_barrier_wait can return either PTHREAD_BARRIER_SERIAL_THREAD or 0. Posix makes no guarantees about which thread return the unique value. Additionally, pthread_join was not called despite seemingly checking for the error.
2016-01-22powerpc: Fix macro usage of htm builtinsPaul E. Murphy
Some extraneous semicolons were included in a recent patch which causes a build failure with newer compilers.
2016-01-21Maintainence patch for nios2: update ULPS file and localplt.data changes.Chung-Lin Tang
2016-01-21Silence some false positive warnings for gcc 4.7Chris Metcalf
2016-01-20NaCl: Fix unused variable errors in lowlevellock-futex.h macros.Roland McGrath
2016-01-202016-01-20 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov
[BZ #19490] * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S (pthread_cond_broadcast): Use ENTRY/END * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S (pthread_cond_signal): Likewise * sysdeps/x86_64/nptl/pthread_spin_lock.S (pthread_spin_lock): Likewise * sysdeps/x86_64/nptl/pthread_spin_trylock.S (pthread_spin_trylock): Likewise * sysdeps/x86_64/nptl/pthread_spin_unlock.S (pthread_spin_unlock): Likewise
2016-01-20Fix __finitel libm compat symbol version.Joseph Myers
The changes to restrict implementation-namespace symbol aliases such as __finitel to compat symbols used code for __finitel in libm analogous to that for __finitel in libc. However, the versions for the two symbols are actually different, GLIBC_2.0 in libc and GLIBC_2.1 in libm. This patch fixes the handling of the libm compat symbol. Tested for mips (o32), where it fixes an ABI test failure. * sysdeps/ieee754/dbl-64/s_finite.c [NO_LONG_DOUBLE && LDBL_CLASSIFY_COMPAT] (__finitel): Define compat symbol at version GLIBC_2_1 and use GLIBC_2_1 in SHLIB_COMPAT condition for libm, not GLIBC_2_0. * sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c [NO_LONG_DOUBLE && LDBL_CLASSIFY_COMPAT] (__finitel): Likewise.
2016-01-20Update localplt.data for powerpc-nofpu.Joseph Myers
Testing for powerpc-nofpu showed that localplt.data was out of date. Two new soft-fp functions showed up in the list: __gtsf2 and __unordsf2; this patch adds these as optional. __signbit and __signbitl no longer appear as local PLT entries; given the move to __builtin_signbit* for all GCC versions supported for building glibc (and given the use of the type-generic signbit macro within glibc), those can safely be removed from the list, which this patch does. Tested for powerpc-nofpu. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data (__gtsf2): Add as optional for libc.so. (__unordsf2): Likewise. (__signbit): Remove for libc.so. (__signbitl): Likewise.
2016-01-20S390: Fix build error in iconvdata/bug-iconv11.c.Stefan Liebler
This fixes the following build error on S390 31bit while building the test iconvdata/bug-iconv11.c with gcc 5.3: bug-iconv11.c: In function ‘test_ibm93x’: bug-iconv11.c:59:11: error: format ‘%td’ expects argument of type ‘ptrdiff_t’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Werror=format=] printf (" ==> %td: %s\n" ^ cc1: all warnings being treated as errors This patch uses %zu format specifier for argument size_t ret instead of %td. ChangeLog: * iconvdata/bug-iconv11.c (test_ibm93x): Use %zu printf format specifier for size_t argument.
2016-01-19Fix ulps regeneration for *-finite tests.Joseph Myers
On running tests after from-scratch ulps regeneration, I found that some libm tests failed with ulps in excess of those recorded in the from-scratch regeneration, which should never happen unless those ulps exceed the limit on ulps that can go in libm-test-ulps files. Failure: Test: atan2_upward (inf, -inf) Result: is: 2.35619498e+00 0x1.2d97ccp+1 should be: 2.35619450e+00 0x1.2d97c8p+1 difference: 4.76837159e-07 0x1.000000p-21 ulp : 2.0000 max.ulp : 1.0000 Maximal error of `atan2_upward' is : 2 ulp accepted: 1 ulp Failure: Test: carg_upward (-inf + inf i) Result: is: 2.35619498e+00 0x1.2d97ccp+1 should be: 2.35619450e+00 0x1.2d97c8p+1 difference: 4.76837159e-07 0x1.000000p-21 ulp : 2.0000 max.ulp : 1.0000 Maximal error of `carg_upward' is : 2 ulp accepted: 1 ulp The problem comes from the addition of tests for the finite-math-only versions of libm functions. Those tests share ulps with the default function variants. make regen-ulps runs the default tests before the finite-math-only tests, concatenating the resulting ulps before feeding them to gen-libm-test.pl to generate a new libm-test-ulps file. But gen-libm-test.pl always takes the last ulps value given for any (function, type) pair. So, if the largest ulps for a function come from non-finite inputs, a from-scratch regeneration loses those ulps. This patch fixes gen-libm-test.pl, in the case where there are multiple ulps values for a (function, type) pair - which can only happen as part of a regeneration - to take the largest ulps value rather than the last one. Tested for ARM / MIPS / powerpc-nofpu. * math/gen-libm-test.pl (parse_ulps): Do not reduce already-recorded ulps. * sysdeps/arm/libm-test-ulps: Regenerated. * sysdeps/mips/mips32/libm-test-ulps: Likewise. * sysdeps/mips/mips64/libm-test-ulps: Likewise. * sysdeps/powerpc/nofpu/libm-test-ulps: Likewise.
2016-01-19Fixed build with assembler w/o AVX-512 support.Andrew Senkevich
* sysdeps/x86_64/multiarch/ifunc-impl-list.c: Fixed build with assembler not supporting AVX-512.
2016-01-19S390: Regenerate ULPsStefan Liebler
I've regenerated ulps from scratch for s390/s390x. All math testcases are passing afterwards. ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.
2016-01-18Regenerate MIPS libm-test-ulps.Joseph Myers
* sysdeps/mips/mips32/libm-test-ulps: Regenerated. * sysdeps/mips/mips64/libm-test-ulps: Likewise.
2016-01-18Regenerate powerpc-nofpu libm-test-ulps.Joseph Myers
* sysdeps/powerpc/nofpu/libm-test-ulps: Regenerated.
2016-01-18Regenerate ARM libm-test-ulps.Joseph Myers
* sysdeps/arm/libm-test-ulps: Regenerated.
2016-01-18[BZ #19451]Paul Pluzhnikov
* math/Makefile (libm-vec-tests): Move libraries after wrappers.o to fix "make check" link failure on Ubuntu.
2016-01-18S/390: Do not raise inexact exception in lrint/lround. [BZ #19486]Stefan Liebler
I get some math test-failures on s390 for float/double/ldouble for various lrint/lround functions like: lrint (0x1p64): Exception "Inexact" set lrint (-0x1p64): Exception "Inexact" set lround (0x1p64): Exception "Inexact" set lround (-0x1p64): Exception "Inexact" set ... GCC emits "convert to fixed" instructions for casting floating point values to integer values. These instructions raise invalid and inexact exceptions if the floating point value exceeds the integer type ranges. This patch enables the various FIX_DBL_LONG_CONVERT_OVERFLOW macros in order to avoid a cast from floating point to integer type and raise the invalid exception with feraiseexcept. The ldbl-128 rint/round functions are now using the same logic. ChangeLog: [BZ #19486] * sysdeps/s390/fix-fp-int-convert-overflow.h: New File. * sysdeps/generic/fix-fp-int-convert-overflow.h (FIX_LDBL_LONG_CONVERT_OVERFLOW, FIX_LDBL_LLONG_CONVERT_OVERFLOW): New define. * sysdeps/arm/fix-fp-int-convert-overflow.h: Likewise. * sysdeps/mips/mips32/fpu/fix-fp-int-convert-overflow.h: Likewise. * sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Avoid conversions to long int where inexact exceptions could be raised. * sysdeps/ieee754/ldbl-128/s_lroundl.c (__lroundl): Likewise. * sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Avoid conversions to long long int where inexact exceptions could be raised. * sysdeps/ieee754/ldbl-128/s_llroundl.c (__llroundl): Likewise.
2016-01-17configure: make the unsupported error message less hostileMike Frysinger
2016-01-16Fixed typos in __memcpy_chk.Andrew Senkevich
* sysdeps/x86_64/multiarch/memcpy_chk.S: Fixed typos.
2016-01-16sparc: mman.h: fix bad comment insertionMike Frysinger
The MCL_ONFAULT define was inserted into the middle of a comment which breaks the build.