Skip to content
Snippets Groups Projects
  1. Jun 05, 2018
    • Joseph Myers's avatar
      Add MAP_FIXED_NOREPLACE from Linux 4.17 to bits/mman.h. · bef1cbf4
      Joseph Myers authored
      Linux 4.17 adds MAP_FIXED_NOREPLACE (value 0x100000 on most
      architectures, 0x200000 on alpha).  This patch adds that macro to
      glibc's bits/mman.h headers.
      
      Tested for x86_64.
      
      	* sysdeps/unix/sysv/linux/aarch64/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): New macro.
      	* sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/arm/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/ia64/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/m68k/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/microblaze/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/mips/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/nios2/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/powerpc/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/riscv/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/s390/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/sh/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/sparc/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      	* sysdeps/unix/sysv/linux/x86/bits/mman.h [__USE_MISC]
      	(MAP_FIXED_NOREPLACE): Likewise.
      bef1cbf4
    • Joseph Myers's avatar
      Update kernel version in syscall-names.list to 4.17. · 0e0577c9
      Joseph Myers authored
      As far as I can tell, Linux 4.17 does not add any new syscalls; this
      patch updates the version number in syscall-names.list to reflect that
      it's still current for 4.17.
      
      Tested for x86_64-linux-gnu with build-many-glibcs.py.
      
      	* sysdeps/unix/sysv/linux/syscall-names.list: Update kernel
      	version to 4.17.
      0e0577c9
  2. Jun 04, 2018
  3. Jun 02, 2018
  4. Jun 01, 2018
    • Leonardo Sandoval's avatar
      benchtests: Catch exceptions in input arguments · a650b05e
      Leonardo Sandoval authored
      Catch runtime exceptions in case the user provided: wrong base
      function, attribute(s) or input file. In any of the latter, quit
      immediately with non-zero return code.
      
      	* benchtests/scripts/compare_string.py: (process_results) Catch
      	exception in non-existent base_func and catch exception in
      	non-existent attribute.
      	(parse_file) Catch exception in non-existent input file.
      a650b05e
    • Leonardo Sandoval's avatar
      benchtests: Add --no-diff and --no-header options · 195abbf4
      Leonardo Sandoval authored
      Having a string comparison report with neither diff numbers nor header
      yields a more useful output to be consumed by other tools.
      
      	* benchtests/scripts/compare_string.py: Add --no-diff and --no-header
      	options to avoid diff calculation and omit header, respectively.
      	(main): process --no-diff and --no-header
      195abbf4
    • Leonardo Sandoval's avatar
      x86-64: Optimize strcmp/wcscmp and strncmp/wcsncmp with AVX2 · 14570163
      Leonardo Sandoval authored
      Optimize x86-64 strcmp/wcscmp and strncmp/wcsncmp with AVX2. It uses vector
      comparison as much as possible. Peak performance observed on a SkyLake
      machine: 9x, 3x, 2.5x and 5.5x for strcmp, strncmp, wcscmp and wcsncmp,
      respectively. The larger the comparison length, the more benefit using
      avx2 functions, except on the strcmp, where peak is observed at length
      == 32 bytes. Select AVX2 strcmp/wcscmp on AVX2 machines where vzeroupper
      is preferred and AVX unaligned load is fast.
      
      NB: It uses TZCNT instead of BSF since TZCNT produces the same result
      as BSF for non-zero input.  TZCNT is faster than BSF and is executed
      as BSF if machine doesn't support TZCNT.
      
      	* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
      	strcmp-avx2, strncmp-avx2, wcscmp-avx2, wcscmp-sse2, wcsncmp-avx2 and
      	wcsncmp-sse2.
      	* sysdeps/x86_64/multiarch/ifunc-impl-list.c
      	(__libc_ifunc_impl_list): Add tests for __strcmp_avx2,
      	__strncmp_avx2,	__wcscmp_avx2, __wcsncmp_avx2, __wcscmp_sse2
      	and __wcsncmp_sse2.
      	* sysdeps/x86_64/multiarch/strcmp.c (OPTIMIZE (avx2)):
      	(IFUNC_SELECTOR): Return OPTIMIZE (avx2) on AVX 2 machines if
      	AVX unaligned load is fast and vzeroupper is preferred.
      	* sysdeps/x86_64/multiarch/strncmp.c: Likewise.
      	* sysdeps/x86_64/multiarch/strcmp-avx2.S: New file.
      	* sysdeps/x86_64/multiarch/strncmp-avx2.S: Likewise.
      	* sysdeps/x86_64/multiarch/wcscmp-avx2.S: Likewise.
      	* sysdeps/x86_64/multiarch/wcscmp-sse2.S: Likewise.
      	* sysdeps/x86_64/multiarch/wcscmp.c: Likewise.
      	* sysdeps/x86_64/multiarch/wcsncmp-avx2.S: Likewise.
      	* sysdeps/x86_64/multiarch/wcsncmp-sse2.c: Likewise.
      	* sysdeps/x86_64/multiarch/wcsncmp.c: Likewise.
      	* sysdeps/x86_64/wcscmp.S (__wcscmp): Add alias only if __wcscmp
      	is undefined.
      14570163
    • Florian Weimer's avatar
      math: Update i686 ulps (--disable-multi-arch configuration) · e02c026f
      Florian Weimer authored
      The results are from configuring with --disable-multi-arch,  building
      with “-march=x86-64 -mtune=generic -mfpmath=sse” and running the
      testsuite on a Haswell-era CPU.
      e02c026f
    • Florian Weimer's avatar
      math: Update i686 ulps · d8c19275
      Florian Weimer authored
      The results are from building with “-march=x86-64 -mtune=generic
      -mfpmath=sse” and running the testsuite on a Haswell-era CPU.
      d8c19275
    • Joseph Myers's avatar
      Make powerpc-nofpu __sqrtsf2, __sqrtdf2 compat symbols (bug 18473). · 0d2163eb
      Joseph Myers authored
      powerpc-nofpu libc exports __sqrtsf2 and __sqrtdf2 symbols.  The
      export of these soft-fp symbols is a mistake; they aren't part of the
      libgcc interface and GCC will never generate code that calls them.
      This patch makes them into compat symbols (no code built for static
      libc), moving their sources from the generic soft-fp sources to
      sysdeps/powerpc/nofpu (the underlying soft-fp FP_SQRT functionality
      remains of use to implement actual sqrt public interfaces, such as
      sqrtl / sqrtf128 for which it is used on various platforms, but
      __sqrt[sdt]f2 are not such interfaces).
      
      Tested with build-many-glibcs.py for relevant platforms.
      
      	[BZ #18473]
      	* soft-fp/sqrttf2.c: Remove file.
      	* soft-fp/sqrtdf2.c: Move to ....
      	* sysdeps/powerpc/nofpu/sqrtdf2.c: ... here.  Include
      	<shlib-compat.h>.
      	(__sqrtdf2): Make conditional on
      	[SHLIB_COMPAT (libc, GLIBC_2_3_2, GLIBC_2_28)].  Define as compat
      	symbol.
      	* soft-fp/sqrtsf2.c: Move to ....
      	* sysdeps/powerpc/nofpu/sqrtsf2.c: ... here.  Include
      	<shlib-compat.h>.
      	(__sqrtsf2): Make conditional on
      	[SHLIB_COMPAT (libc, GLIBC_2_3_2, GLIBC_2_28)].  Define as compat
      	symbol.
      	* soft-fp/Makefile (gcc-single-routines): Remove sqrtsf2.
      	(gcc-double-routines): Remove sqrtdf2.
      	(gcc-quad-routines): Remove sqrttf2.
      	* sysdeps/nios2/Makefile [$(subdir) = soft-fp] (sysdep_routines):
      	Do not filter out sqrtsf2 and sqrtdf2.
      	* sysdeps/powerpc/nofpu/Makefile [$(subdir) = soft-fp]
      	(sysdep_routines): Add sqrtsf2 and sqrtdf2.
      0d2163eb
    • Florian Weimer's avatar
      Remove sysdeps/generic/libcidn.abilist · 10450210
      Florian Weimer authored
      This file was left behind by the libidn removal in commit
      7f9f1ecb.
      10450210
    • Florian Weimer's avatar
      libio: Avoid _allocate_buffer, _free_buffer function pointers [BZ #23236] · 4e8a6346
      Florian Weimer authored
      These unmangled function pointers reside on the heap and could
      be targeted by exploit writers, effectively bypassing libio vtable
      validation.  Instead, we ignore these pointers and always call
      malloc or free.
      
      In theory, this is a backwards-incompatible change, but using the
      global heap instead of the user-supplied callback functions should
      have little application impact.  (The old libstdc++ implementation
      exposed this functionality via a public, undocumented constructor
      in its strstreambuf class.)
      4e8a6346
  5. May 30, 2018
  6. May 29, 2018
  7. May 25, 2018
    • Joseph Myers's avatar
      Remove sysdeps/sparc/sparc64/soft-fp directory. · b5453d9f
      Joseph Myers authored
      As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
      there should not be separate sysdeps/<arch>/soft-fp directories when
      those are used by all configurations that use sysdeps/<arch>, and,
      more generally, should not be sysdeps/foo/Implies files pointing to a
      subdirectory foo/bar.  This patch eliminates the
      sysdeps/sparc/sparc64/soft-fp directory accordingly, merging its
      contents into sysdeps/sparc/sparc64.  This completes removing the
      unnecessary <arch>/soft-fp sysdeps directories.
      
      sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c is removed rather than moved.
      It was not in fact used previously - the ldbl-128 version of
      e_ilogbl.c was used instead - and moving it into sysdeps/sparc/sparc64
      results in it being used, but causing a build failure because of
      FP_DECL_EX declaring an unused variable (as I noted in
      <https://sourceware.org/ml/libc-alpha/2013-10/msg00457.html> that file
      doesn't appear to use FP_DECL_EX).  Given that the file was previously
      unused and so presumably not tested recently, removing it is the safe
      way to avoid this patch changing what actually gets built into glibc
      (if this file should turn out more efficient than the ldbl-128
      e_ilogbl.c, it can always be added back in future with the build
      failure fixed).
      
      Tested with build-many-glibcs.py that installed stripped shared
      libraries for sparc configurations are unchanged by this patch.
      
      	* sysdeps/sparc/sparc64/Implies: Remove sparc/sparc64/soft-fp.
      	* sysdeps/sparc/sparc64/Makefile [$(subdir) = soft-fp]
      	(sparc64-quad-routines): New variable.  Moved from ....
      	[$(subdir) = soft-fp] (sysdep_routines): Add
      	$(sparc64-quad-routines).  Moved from ....
      	[$(subdir) = math] (CPPFLAGS): Add -I../soft-fp/.  Moved from ....
      	* sysdeps/sparc/sparc64/soft-fp/Makefile: ... here.  Remove file.
      	* sysdeps/sparc/sparc64/Versions (libc): Add GLIBC_2.2 symbols
      	moved from ....
      	* sysdeps/sparc/sparc64/soft-fp/Versions: ... here.  Remove file.
      	* sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c: Remove file.
      	* sysdeps/sparc/sparc64/soft-fp/qp_add.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_add.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_cmp.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_cmp.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_cmpe.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_div.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_div.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_dtoq.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_feq.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_feq.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_fge.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_fge.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_fgt.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_fgt.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_fle.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_fle.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_flt.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_flt.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_fne.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_fne.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_itoq.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_mul.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_mul.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_neg.S: Move to ....
      	* sysdeps/sparc/sparc64/qp_neg.S: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_qtod.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_qtoi.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_qtos.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_qtoui.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_qtoux.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_qtox.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_sqrt.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_sqrt.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_stoq.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_sub.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_uitoq.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_util.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_util.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_uxtoq.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Move to ....
      	* sysdeps/sparc/sparc64/qp_xtoq.c: ... here.
      	* sysdeps/sparc/sparc64/soft-fp/sfp-machine.h: Move to ....
      	* sysdeps/sparc/sparc64/sfp-machine.h: ... here.
      b5453d9f
    • Joseph Myers's avatar
      Remove sysdeps/sparc/sparc32/soft-fp directory. · 2c753f3e
      Joseph Myers authored
      As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
      there should not be separate sysdeps/<arch>/soft-fp directories when
      those are used by all configurations that use sysdeps/<arch>, and,
      more generally, should not be sysdeps/foo/Implies files pointing to a
      subdirectory foo/bar.  This patch eliminates the
      sysdeps/sparc/sparc32/soft-fp directory accordingly, merging its
      contents into sysdeps/sparc/sparc32.
      
      Tested with build-many-glibcs.py that installed stripped shared
      libraries for sparc configurations are unchanged by this patch.
      
      	* sysdeps/sparc/sparc32/Implies: Remove sparc/sparc32/soft-fp.
      	* sysdeps/sparc/sparc32/Makefile [$(subdir) = soft-fp]
      	(sparc32-quad-routines): New variable.  Moved from ....
      	[$(subdir) = soft-fp] (sysdep_routines): Add
      	$(sparc32-quad-routines).  Moved from ....
      	* sysdeps/sparc/sparc32/soft-fp/Makefile: ... here.  Remove file.
      	* sysdeps/sparc/sparc32/Versions (libc): Add GLIBC_2.4 symbols
      	moved from ....
      	* sysdeps/sparc/sparc32/soft-fp/Versions: ... here.  Remove file.
      	* sysdeps/sparc/sparc32/soft-fp/q_add.c: Move to ....
      	* sysdeps/sparc/sparc32/q_add.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_cmp.c: Move to ....
      	* sysdeps/sparc/sparc32/q_cmp.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_cmpe.c: Move to ....
      	* sysdeps/sparc/sparc32/q_cmpe.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_div.c: Move to ....
      	* sysdeps/sparc/sparc32/q_div.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Move to ....
      	* sysdeps/sparc/sparc32/q_dtoq.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_feq.c: Move to ....
      	* sysdeps/sparc/sparc32/q_feq.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_fge.c: Move to ....
      	* sysdeps/sparc/sparc32/q_fge.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_fgt.c: Move to ....
      	* sysdeps/sparc/sparc32/q_fgt.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_fle.c: Move to ....
      	* sysdeps/sparc/sparc32/q_fle.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_flt.c: Move to ....
      	* sysdeps/sparc/sparc32/q_flt.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_fne.c: Move to ....
      	* sysdeps/sparc/sparc32/q_fne.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Move to ....
      	* sysdeps/sparc/sparc32/q_itoq.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Move to ....
      	* sysdeps/sparc/sparc32/q_lltoq.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_mul.c: Move to ....
      	* sysdeps/sparc/sparc32/q_mul.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_neg.c: Move to ....
      	* sysdeps/sparc/sparc32/q_neg.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Move to ....
      	* sysdeps/sparc/sparc32/q_qtod.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Move to ....
      	* sysdeps/sparc/sparc32/q_qtoi.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Move to ....
      	* sysdeps/sparc/sparc32/q_qtoll.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Move to ....
      	* sysdeps/sparc/sparc32/q_qtos.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Move to ....
      	* sysdeps/sparc/sparc32/q_qtou.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Move to ....
      	* sysdeps/sparc/sparc32/q_qtoull.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_sqrt.c: Move to ....
      	* sysdeps/sparc/sparc32/q_sqrt.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Move to ....
      	* sysdeps/sparc/sparc32/q_stoq.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_sub.c: Move to ....
      	* sysdeps/sparc/sparc32/q_sub.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Move to ....
      	* sysdeps/sparc/sparc32/q_ulltoq.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_util.c: Move to ....
      	* sysdeps/sparc/sparc32/q_util.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Move to ....
      	* sysdeps/sparc/sparc32/q_utoq.c: ... here.
      	* sysdeps/sparc/sparc32/soft-fp/sfp-machine.h: Move to ....
      	* sysdeps/sparc/sparc32/sfp-machine.h: ... here.
      2c753f3e
    • Tulio Magno Quites Machado Filho's avatar
      powerpc: Move around math-related Implies · c1dc1e1b
      Tulio Magno Quites Machado Filho authored
      Currently, powerpc, powerpc64, and powerpc64le imply the same set of
      subdirectories from sysdeps/ieee754: flt-32, dbl-64, ldbl-128ibm, and
      ldbl-opt.  In preparation for the transition of the long double format -
      from IBM Extended Precision to IEEE 754 128-bits floating-point - on
      powerpc64le, this patch splits the shared Implies file into three
      separate files (one for each of the powerpc architectures), without
      changing their contents.  Future patches will modify powerpc64le.
      
      	* sysdeps/powerpc/Implies: Removed.  Previous contents copied to...
      	* sysdeps/powerpc/powerpc32/Implies-after: ... here.
      	* sysdeps/powerpc/powerpc64/be/Implies-after: ... here.
      	* sysdeps/powerpc/powerpc64/le/Implies-before: ... and here.
      c1dc1e1b
  8. May 24, 2018
    • Joseph Myers's avatar
      Remove sysdeps/powerpc/soft-fp directory. · 14186e8d
      Joseph Myers authored
      As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
      there should not be separate sysdeps/<arch>/soft-fp directories when
      those are used by all configurations that use sysdeps/<arch>, and,
      more generally, should not be sysdeps/foo/Implies files pointing to a
      subdirectory foo/bar.
      
      sysdeps/powerpc/soft-fp isn't quite such a case, as the Implies files
      pointing to it are
      sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies and
      sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nofpu/Implies (and
      indeed there is a different sfp-machine.h used for powerpc64le).
      However, the same principle applies: there is no need for this
      directory because sfp-machine.h, the only file in it, can most
      naturally go in sysdeps/powerpc/nofpu, which is used by exactly the
      same configurations (and there is a close dependence between the files
      there and the sfp-machine.h implementation).  This patch eliminates
      the sysdeps/powerpc/soft-fp directory accordingly.
      
      Tested with build-many-glibcs.py that installed stripped shared
      libraries for powerpc configurations are unchanged by this patch.
      
      	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies: Remove
      	powerpc/soft-fp.
      	* sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nofpu/Implies:
      	Likewise.
      	* sysdeps/powerpc/soft-fp/sfp-machine.h: Move to ....
      	* sysdeps/powerpc/nofpu/sfp-machine.h: ... here.
      14186e8d
    • Gabriel F. T. Gomes's avatar
      Fix parameter type in C++ version of iseqsig (bug 23171) · fb0e10b8
      Gabriel F. T. Gomes authored
      The commit
      
        commit c85e54ac
        Author: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
        Date:   Fri Nov 3 10:44:36 2017 -0200
      
            Provide a C++ version of iseqsig (bug 22377)
      
      mistakenly used double parameters in the long double version of iseqsig,
      thus causing spurious conversions to double, as reported on bug 23171.
      
      Tested for powerpc64le and x86_64.
      fb0e10b8
    • Florian Weimer's avatar
  9. May 23, 2018
    • Joseph Myers's avatar
      Remove sysdeps/sh/soft-fp directory. · 1dfeb17e
      Joseph Myers authored
      As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
      there should not be separate sysdeps/<arch>/soft-fp directories when
      those are used by all configurations that use sysdeps/<arch>, and,
      more generally, should not be sysdeps/foo/Implies files pointing to a
      subdirectory foo/bar.  This patch eliminates the sysdeps/sh/soft-fp
      directory accordingly, merging its contents into sysdeps/sh.
      
      Tested with build-many-glibcs.py that installed stripped shared
      libraries for sh configurations are unchanged by this patch.
      
      	* sysdeps/sh/Implies: Remove sh/soft-fp.
      	* sysdeps/sh/soft-fp/sfp-machine.h: Move to ....
      	* sysdeps/sh/sfp-machine.h: ... here.
      1dfeb17e
    • H.J. Lu's avatar
      x86-64: Skip zero length in __mem[pcpy|move|set]_erms · 727b38df
      H.J. Lu authored
      This patch skips zero length in __mempcpy_erms, __memmove_erms and
      __memset_erms.
      
      Tested on x86-64.
      
      	* sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
      	(__mempcpy_erms): Skip zero length.
      	(__memmove_erms): Likewise.
      	* sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S
      	(__memset_erms): Likewise.
      727b38df
    • Joseph Myers's avatar
      Remove sysdeps/alpha/soft-fp directory. · 2834fb46
      Joseph Myers authored
      As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
      there should not be separate sysdeps/<arch>/soft-fp directories when
      those are used by all configurations that use sysdeps/<arch>, and,
      more generally, should not be sysdeps/foo/Implies files pointing to a
      subdirectory foo/bar.  This patch eliminates the
      sysdeps/alpha/soft-fp directory accordingly, merging its contents
      into sysdeps/alpha.
      
      Tested with build-many-glibcs.py that installed stripped shared
      libraries for alpha-linux-gnu are unchanged by this patch.
      
      	* sysdeps/alpha/Implies: Remove alpha/soft-fp.
      	* sysdeps/alpha/Makefile [$(subdir) = soft-fp] (sysdep_routines):
      	Add functions moved from ....
      	[$(subdir) = math] (CPPFLAGS): Add -I../soft-fp.  Moved from ....
      	* sysdeps/alpha/soft-fp/Makefile: ... here.  Remove file.
      	* sysdeps/alpha/Versions (libc): Add GLIBC_2.3.4 symbols moved
      	from ....
      	* sysdeps/alpha/soft-fp/Versions: ... here.  Remove file.
      	* sysdeps/alpha/soft-fp/e_sqrtl.c: Move to ....
      	* sysdeps/alpha/e_sqrtl.c: ... here.
      	* sysdeps/alpha/soft-fp/local-soft-fp.h: Move to ....
      	* sysdeps/alpha/local-soft-fp.h: ... here.
      	* sysdeps/alpha/soft-fp/ots_add.c: Move to ....
      	* sysdeps/alpha/ots_add.c: ... here.
      	* sysdeps/alpha/soft-fp/ots_cmp.c: Move to ....
      	* sysdeps/alpha/ots_cmp.c: ... here.
      	* sysdeps/alpha/soft-fp/ots_cmpe.c: Move to ....
      	* sysdeps/alpha/ots_cmpe.c: ... here.
      	* sysdeps/alpha/soft-fp/ots_cvtqux.c: Move to ....
      	* sysdeps/alpha/ots_cvtqux.c: ... here.
      	* sysdeps/alpha/soft-fp/ots_cvtqx.c: Move to ....
      	* sysdeps/alpha/ots_cvtqx.c: ... here.
      	* sysdeps/alpha/soft-fp/ots_cvttx.c: Move to ....
      	* sysdeps/alpha/ots_cvttx.c: ... here.
      	* sysdeps/alpha/soft-fp/ots_cvtxq.c: Move to ....
      	* sysdeps/alpha/ots_cvtxq.c: ... here.
      	* sysdeps/alpha/soft-fp/ots_cvtxt.c: Move to ....
      	* sysdeps/alpha/ots_cvtxt.c: ... here.
      	* sysdeps/alpha/soft-fp/ots_div.c: Move to ....
      	* sysdeps/alpha/ots_div.c: ... here.
      	* sysdeps/alpha/soft-fp/ots_mul.c: Move to ....
      	* sysdeps/alpha/ots_mul.c: ... here.
      	* sysdeps/alpha/soft-fp/ots_nintxq.c: Move to ....
      	* sysdeps/alpha/ots_nintxq.c: ... here.
      	* sysdeps/alpha/soft-fp/ots_sub.c: Move to ....
      	* sysdeps/alpha/ots_sub.c: ... here.
      	* sysdeps/alpha/soft-fp/sfp-machine.h: Move to ....
      	* sysdeps/alpha/sfp-machine.h: ... here.
      2834fb46
    • Florian Weimer's avatar
      Switch IDNA implementation to libidn2 [BZ #19728] [BZ #19729] [BZ #22247] · 7f9f1ecb
      Florian Weimer authored
      This provides an implementation of the IDNA2008 standard and fixes
      CVE-2016-6261, CVE-2016-6263, CVE-2017-14062.
      7f9f1ecb
    • Florian Weimer's avatar
    • H.J. Lu's avatar
      Add a test case for [BZ #23196] · ed983107
      H.J. Lu authored
      	[BZ #23196]
      	* string/test-memcpy.c (do_test1): New function.
      	(test_main): Call it.
      ed983107
    • Andreas Schwab's avatar
      Don't write beyond destination in __mempcpy_avx512_no_vzeroupper (bug 23196) · 9aaaab7c
      Andreas Schwab authored
      When compiled as mempcpy, the return value is the end of the destination
      buffer, thus it cannot be used to refer to the start of it.
      9aaaab7c
  10. May 22, 2018
    • Joseph Myers's avatar
      Remove sysdeps/aarch64/soft-fp directory. · 8f145c77
      Joseph Myers authored
      As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
      there should not be separate sysdeps/<arch>/soft-fp directories when
      those are used by all configurations that use sysdeps/<arch>, and,
      more generally, should not be sysdeps/foo/Implies files pointing to a
      subdirectory foo/bar.  This patch eliminates the
      sysdeps/aarch64/soft-fp directory accordingly, merging its contents
      into sysdeps/aarch64.
      
      Tested with build-many-glibcs.py that installed stripped shared
      libraries for aarch64 configurations are unchanged by this patch.
      
      	* sysdeps/aarch64/Implies: Remove aarch64/soft-fp.
      	* sysdeps/aarch64/Makefile [$(subdir) = math] (CPPFLAGS): Add
      	-I../soft-fp.  Moved from ....
      	* sysdeps/aarch64/soft-fp/Makefile: ... here.  Remove file.
      	* sysdeps/aarch64/soft-fp/e_sqrtl.c: Move to ....
      	* sysdeps/aarch64/e_sqrtl.c: ... here.
      	* sysdeps/aarch64/soft-fp/sfp-machine.h: Move to ....
      	* sysdeps/aarch64/sfp-machine.h: ... here.
      8f145c77
    • Joseph Myers's avatar
      Fix i686-linux-gnu build with GCC mainline. · 3d6302a5
      Joseph Myers authored
      Building with recent GCC mainline for i686-linux-gnu is failing with:
      
      ../sysdeps/ieee754/flt-32/k_rem_pio2f.c: In function '__kernel_rem_pio2f':
      ../sysdeps/ieee754/flt-32/k_rem_pio2f.c:186:28: error: 'fq[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         fv = math_narrow_eval (fq[0]-fv);
                                  ^
      
      and
      
      ../sysdeps/ieee754/dbl-64/k_rem_pio2.c: In function '__kernel_rem_pio2':
      ../sysdeps/ieee754/dbl-64/k_rem_pio2.c:333:32: error: 'fq[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             fv = math_narrow_eval (fq[0] - fv);
                                      ^
      
      These are similar to -Warray-bounds cases for which the DIAG_* macros
      are already used in those files: the array element is in fact always
      initialized, but the reasoning that it is depends on another array not
      having been all zero at an earlier point, which depends on the
      functions not being called with zero arguments.  Thus, this patch uses
      DIAG_* to disable -Wmaybe-uninitialized for this code.
      
      (The warning may be i686-specific because of math_narrow_eval somehow
      perturbing what the compiler does with this code enough to cause the
      warning.  I don't know why it doesn't appear for i686-gnu.)
      
      Tested with build-many-glibcs.py that this fixes the i686 build in
      this configuration.
      
      	* sysdeps/ieee754/dbl-64/k_rem_pio2.c (__kernel_rem_pio2): Ignore
      	-Wmaybe-uninitialized around access to fq[0].
      	* sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f):
      	Likewise.
      3d6302a5
    • Joseph Myers's avatar
      Make llseek a compat symbol (bug 18471). · 5c5c0dd7
      Joseph Myers authored
      The llseek function name is an obsolete, Linux-specific, unprototyped
      name for lseek64 with a link-time warning.  This patch completes the
      obsoletion of this function name by making it into a compat symbol,
      not available for newly linked programs and not included in the ABI
      for new ports.
      
      When a compat symbol is defined in syscalls.list, the code for that
      function is not built at all for static linking unless some non-compat
      symbol for that function is also defined with an explicit symbol
      version, so an explicit symbol version for lseek64 is added to the
      MIPS n32 syscalls.list.  The case in make-syscalls.sh that handles
      such explicit non-compat symbol versions then needs to be changed to
      use weak_alias instead of strong_alias when the syscall is built
      outside of libc, to avoid linknamespace failures from a strong lseek64
      symbol in static libpthread.
      
      The x32 llseek.S was as far as I could tell already unused (nothing
      builds an llseek.* source file, at least since the lseek / lseek64 /
      llseek consolidation), so is removed in this patch as well.
      
      Tested for x86_64 and x86, and with build-many-glibcs.py.
      
      	[BZ #18471]
      	* sysdeps/unix/make-syscalls.sh (emit_weak_aliases): Use weak
      	aliases for non-libc case of versioned symbols.
      	* sysdeps/unix/sysv/linux/lseek64.c: Include <shlib-compat.h>.
      	(llseek): Define as compat symbol if
      	[SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_28)], not as weak alias
      	with link warning.
      	* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (llseek):
      	Make into a compat symbol, disabled for minimum symbol version
      	GLIBC_2.28 and later.
      	* sysdeps/unix/sysv/linux/x86_64/x32/llseek.S: Remove file.
      5c5c0dd7
    • Florian Weimer's avatar
      i386: Drop -mpreferred-stack-boundary=4 · ed0d6988
      Florian Weimer authored
      The flag was a left-over from when the -mpreferred-stack-boundary=2 flag
      was removed in commit db290cf5.
      ed0d6988
  11. May 21, 2018
    • H.J. Lu's avatar
      x86-64: Check Prefer_FSRM in ifunc-memmove.h · e28e9b1e
      H.J. Lu authored
      Although the REP MOVSB implementations of memmove, memcpy and mempcpy
      aren't used by the current processors, this patch adds Prefer_FSRM
      check in ifunc-memmove.h so that they can be used in the future.
      
      	* sysdeps/x86/cpu-features.h (bit_arch_Prefer_FSRM): New.
      	(index_arch_Prefer_FSRM): Likewise.
      	* sysdeps/x86/cpu-tunables.c (TUNABLE_CALLBACK (set_hwcaps)):
      	Also check Prefer_FSRM.
      	* sysdeps/x86_64/multiarch/ifunc-memmove.h (IFUNC_SELECTOR):
      	Also return OPTIMIZE (erms) for Prefer_FSRM.
      e28e9b1e
    • H.J. Lu's avatar
      Initial Fast Short REP MOVSB (FSRM) support · 1af30adc
      H.J. Lu authored
      The newer Intel processors support Fast Short REP MOVSB which has a
      feature bit in CPUID.  This patch adds the Fast Short REP MOVSB (FSRM)
      bit to x86 cpu-features.
      
      	* sysdeps/x86/cpu-features.h (bit_cpu_FSRM): New.
      	(index_cpu_FSRM): Likewise.
      	(reg_FSRM): Likewise.
      1af30adc
  12. May 18, 2018
    • Joseph Myers's avatar
      Split test-tgmath3 by function. · 7c67e6e8
      Joseph Myers authored
      It has been noted that test-tgmath3 is slow to compile, and to link on
      some systems
      <https://sourceware.org/ml/libc-alpha/2018-02/msg00477.html>, because
      of the size of the test.
      
      I'm working on tgmath.h support for the TS 18661-1 / 18661-3 functions
      that round their results to a narrower type.  For the functions
      already present in glibc, this wouldn't make test-tgmath3 much bigger,
      because those functions only have two arguments.  For the narrowing
      versions of fma (for which I've not yet added the functions to glibc),
      however, it would result in many configurations building tests of the
      type-generic macros f32fma, f64fma, f32xfma, f64xfma, each with 21
      possible types for each of three arguments (float, double, long double
      aren't valid argument types for these macros when they return a
      _FloatN / _FloatNx type), so substantially increasing the size of the
      testcase.
      
      To avoid further increasing the size of a single test when adding the
      type-generic narrowing fma macros, this patch arranges for the
      test-tgmath3 tests to be run separately for each function tested.  The
      fma tests are still by far the largest (next is pow, as that has two
      arguments that can be real or complex; after that, the two-argument
      real-only functions), but each type-generic fma macro for a different
      return type would end up with its tests being run separately, rather
      than increasing the size of a single test.
      
      To avoid accidentally missing testing a macro because
      gen-tgmath-tests.py supports testing it but the makefile fails to call
      it for that function, a test is also added that verifies that the
      lists of macros in the makefile and gen-tgmath-tests.py agree.
      
      Tested for x86_64.
      
      	* math/gen-tgmath-tests.py: Import sys.
      	(Tests.__init__): Initialize macros_seen.
      	(Tests.add_tests): Add macro to macros_seen.  Only generate tests
      	if requested to do so for this macro.
      	(Tests.add_all_tests): Take argument for macro for which to
      	generate tests.
      	(Tests.check_macro_list): New function.
      	(main): Handle check-list argument and argument specifying macro
      	for which to generate tests.
      	* math/Makefile [PYTHON] (tgmath3-macros): New variable.
      	[PYTHON] (tgmath3-macro-tests): Likewise.
      	[PYTHON] (tests): Add $(tgmath3-macro-tests) not test-tgmath3.
      	[PYTHON] (generated): Add $(addsuffix .c,$(tgmath3-macro-tests))
      	not test-tgmath3.c.
      	[PYTHON] (CFLAGS-test-tgmath3.c): Remove.
      	[PYTHON] ($(tgmath3-macro-tests:%=$(objpfx)%.o): Add -fno-builtin
      	to CFLAGS.
      	[PYTHON] ($(objpfx)test-tgmath3.c): Replace rule by....
      	[PYTHON] ($(foreach
      	m,$(tgmath3-macros),$(objpfx)test-tgmath3-$(m).c): ... this.  New
      	rule.
      	[PYTHON] (tests-special): Add
      	$(objpfx)test-tgmath3-macro-list.out.
      	[PYTHON] ($(objpfx)test-tgmath3-macro-list.out): New rule.
      7c67e6e8
    • Joseph Myers's avatar
      Obsolete nfsservctl. · ebc129fd
      Joseph Myers authored
      The Linux nfsservctl syscall was removed in Linux 3.1.  Since the
      minimum kernel version for use with glibc is 3.2, the glibc wrapper
      for this syscall can no longer usefully be called.  This patch makes
      it into a compat symbol, not provided at all for static linking or new
      ports.  (It was already the case that there was no header declaration
      of this function.)
      
      Tested for x86_64.
      
      	* sysdeps/unix/sysv/linux/syscalls.list (nfsservctl): Make into a
      	compat symbol, disabled for minimum symbol version GLIBC_2.28 and
      	later.
      ebc129fd
    • Joseph Myers's avatar
      Fix year 2039 bug for localtime with 64-bit time_t (bug 22639). · 78274dc8
      Joseph Myers authored
      Bug 22639 reports localtime failing to handle time offset transitions
      correctly in 2039 and later on platforms with 64-bit time_t.
      
      The problem is the use of SECSPERDAY (constant 86400) in calculations
      such as
      
          t = ((year - 1970) * 365
      	 + /* Compute the number of leapdays between 1970 and YEAR
      	      (exclusive).  There is a leapday every 4th year ...  */
      	 + ((year - 1) / 4 - 1970 / 4)
      	 /* ... except every 100th year ... */
      	 - ((year - 1) / 100 - 1970 / 100)
      	 /* ... but still every 400th year.  */
      	 + ((year - 1) / 400 - 1970 / 400)) * SECSPERDAY;
      
      where t is of type time_t and year is of type int.  Before my commit
      92bd70fb (an update from tzcode,
      included in 2.26 and later releases), SECSPERDAY was obtained from a
      file imported from tzcode, where the value included a cast to
      int_fast32_t.  On 64-bit platforms, glibc defines int_fast32_t to be
      long int, so 64-bit, but my patch resulted in it changing to int.
      (The bug would probably have existed even before my patch for x32,
      which has 64-bit time_t but 32-bit int_fast32_t, but I haven't
      verified that.)
      
      This patch fixes the problem by including a cast to time_t in the
      definition of SECSPERDAY.  (64-bit time support for 32-bit systems
      should move such code that isn't a public interface to using the
      internal 64-bit version of time_t throughout.)
      
      Tested for x86_64 and x86.
      
      	[BZ #22639]
      	* time/tzset.c (SECSPERDAY): Cast to time_t.
      	* time/tst-y2039.c: New file.
      	* time/Makefile (tests): Add tst-y2039.
      78274dc8
  13. May 17, 2018
Loading