]> sourceware.org Git - glibc.git/log
glibc.git
8 years agoRemove __ASSUME_GETDENTS64_SYSCALL.
Joseph Myers [Tue, 22 Mar 2016 00:32:20 +0000 (00:32 +0000)]
Remove __ASSUME_GETDENTS64_SYSCALL.

This patch removes the __ASSUME_GETDENTS64_SYSCALL macro, as its
definition is constant given the new kernel version requirements (and
was constant anyway before those requirements except for MIPS n32).

Note that the "#ifdef __NR_getdents64" conditional *is* still needed,
because MIPS n64 only has the getdents syscall (being a 64-bit ABI,
that syscall is 64-bit; the difference between the two on 64-bit
architectures is where d_type goes).  If MIPS n64 were to gain the
getdents64 syscall and we wanted to use it conditionally on the kernel
version at runtime we'd have to revert this patch, but I think that's
unlikely (and in any case, we could follow the simpler approach of
undefining __NR_getdents64 if the syscall can't be assumed, just like
we do for accept4 / recvmmsg / sendmmsg syscalls on architectures
where socketcall support came first).

Most of the getdents.c changes are reindentation.

Tested for x86_64 and x86 that installed stripped shared libraries are
unchanged by the patch.

* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_GETDENTS64_SYSCALL): Remove macro.
* sysdeps/unix/sysv/linux/getdents.c
[!__ASSUME_GETDENTS64_SYSCALL]: Remove conditional code.
[!have_no_getdents64_defined]: Likewise.
(__GETDENTS): Remove __have_no_getdents64 conditional.

8 years agoRemove __ASSUME_SIGNALFD4.
Joseph Myers [Mon, 21 Mar 2016 16:30:05 +0000 (16:30 +0000)]
Remove __ASSUME_SIGNALFD4.

Current Linux kernel version requirements mean the signalfd4 syscall
can always be assumed to be available.  This patch removes
__ASSUME_SIGNALFD4 and associated conditionals.

Tested for x86_64 and x86 that installed stripped shared libraries are
unchanged by the patch.

* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_SIGNALFD4):
Remove macro.
* sysdeps/unix/sysv/linux/signalfd.c: Do not include
<kernel-features.h>.
(signalfd) [__NR_signalfd4]: Make code unconditional.
(signalfd) [!__ASSUME_SIGNALFD4]: Remove conditional code.

8 years agoposix: Fix posix_spawn implict check style
Adhemerval Zanella [Mon, 21 Mar 2016 15:10:20 +0000 (12:10 -0300)]
posix: Fix posix_spawn implict check style

This patch fixes the implicit check style add in 2a69f853c for the
general convention one.

Checked on x86_64.

* sysdeps/unix/sysv/linux/spawni.c (__spawnix): Fix implict checks
style.

8 years agoUse JUMPTARGET in x86-64 pthread
H.J. Lu [Mon, 21 Mar 2016 13:38:17 +0000 (06:38 -0700)]
Use JUMPTARGET in x86-64 pthread

When PLT may be used, JUMPTARGET should be used instead calling the
function directly.

* sysdeps/unix/sysv/linux/x86_64/cancellation.S
(__pthread_enable_asynccancel): Use JUMPTARGET to call
__pthread_unwind.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
(__condvar_cleanup2): Use JUMPTARGET to call _Unwind_Resume.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
(__condvar_cleanup1): Likewise.

8 years agolocaledata: standardize copyright/license information [BZ #11213]
Mike Frysinger [Sat, 20 Feb 2016 06:59:46 +0000 (01:59 -0500)]
localedata: standardize copyright/license information [BZ #11213]

Use the language from the FSF in all locale files to disclaim any
license/copyright on locale data.

See https://sourceware.org/ml/libc-locales/2013-q1/msg00048.html

8 years agomath: don't clobber old libm.so on install [BZ #19822]
Dylan Alex Simon [Tue, 15 Mar 2016 17:20:01 +0000 (13:20 -0400)]
math: don't clobber old libm.so on install [BZ #19822]

When installing glibc (w/mathvec enabled) in-place on a system with
a glibc w/out mathvec enabled, the install will clobber the existing
libm.so (e.g., /lib64/libm-2.21.so) with a linker script.  This is
because libm.so is a symlink to libm.so.6 which is a symlink to the
final libm-2.21.so file.  When the makefile writes the linker script
directly to libm.so, it gets clobbered.

The simple patch below to math/Makefile fixes this.  It is based on
the nptl Makefile, which does exactly the same thing in a safer way.

8 years agolocaledata: standardize first few lines
Mike Frysinger [Sat, 20 Feb 2016 06:55:12 +0000 (01:55 -0500)]
localedata: standardize first few lines

Purely a style touchup to make sure the headers all look the same.

8 years agoposix: Fix posix_spawn invalid memory access
Adhemerval Zanella [Sun, 20 Mar 2016 20:35:24 +0000 (17:35 -0300)]
posix: Fix posix_spawn invalid memory access

Current Linux posix_spawn spawn do not test if the pid argument is
valid before trying to update it for success case.  This patch fixes
it.

Tested on x86_64 and i686.

* sysdeps/unix/sysv/linux/spawni.c (__spawnix): Fix invalid memory
access where posix_spawn success and pid argument is null.
* posix/tst-spawn.c (do_test): Add posix_spawn null pid argument for
success case.

8 years agohurd: Add c++-types expected result
Samuel Thibault [Sun, 20 Mar 2016 21:16:34 +0000 (22:16 +0100)]
hurd: Add c++-types expected result

* sysdeps/mach/hurd/i386/c++-types.data: New file.

8 years agohurd: Allow inlining IO locks
Samuel Thibault [Sun, 20 Mar 2016 21:12:06 +0000 (22:12 +0100)]
hurd: Allow inlining IO locks

* sysdeps/mach/hurd/libc-lock.h (_IO_lock_inexpensive): Define to 1.

8 years agohurd: Do not hide rtld symbols which need to be preempted
Samuel Thibault [Sun, 20 Mar 2016 16:56:47 +0000 (17:56 +0100)]
hurd: Do not hide rtld symbols which need to be preempted

* sysdeps/generic/dl-fcntl.h: New file, adds attribute_hidden to __open
and __fcntl.
* sysdeps/mach/hurd/dl-fcntl.h: New file, adds attribute_hidden to
__fcntl only.
* include/fcntl.h [IS_IN (rtld)]: Include <dl-fcntl.h> instead of
adding attribute_hidden to __open and __fcntl.

8 years agoFix mach-syscalls.mk build
Samuel Thibault [Sun, 20 Mar 2016 18:50:58 +0000 (19:50 +0100)]
Fix mach-syscalls.mk build

* mach/Makefile ($(objpfx)mach-syscalls.mk): Depend on libc-modules.h.

8 years agohurd: Break errnos.d / libc-modules.h dependency loop
Samuel Thibault [Sun, 20 Mar 2016 15:44:44 +0000 (16:44 +0100)]
hurd: Break errnos.d / libc-modules.h dependency loop

Generating errnos.d does not actually need libc-modules.h.

* sysdeps/mach/hurd/Makefile ($(common-objpfx)errnos.d): Strip
"-include $(common-objpfx)libc-modules.h" from CPPFLAGS, and do not
depend on libc-modules.h,

8 years agoRemove __ASSUME_EVENTFD2, move eventfd to syscalls.list.
Joseph Myers [Thu, 17 Mar 2016 19:07:39 +0000 (19:07 +0000)]
Remove __ASSUME_EVENTFD2, move eventfd to syscalls.list.

Given current Linux kernel version requirements, we can assume the
presence of the eventfd2 syscall.  This means that __ASSUME_EVENTFD2
can be removed, and a syscalls.list entry suffices for eventfd instead
of needing a .c file.  This patch implements those changes.

Tested for x86_64 and x86 (not that that means much, given the lack of
testsuite coverage for eventfd).

* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_EVENTFD2):
Remove macro.
* sysdeps/unix/sysv/linux/eventfd.c: Remove file.
* sysdeps/unix/sysv/linux/syscalls.list (eventfd): New syscall
entry.

8 years agoRemove __ASSUME_FALLOCATE.
Joseph Myers [Thu, 17 Mar 2016 12:15:51 +0000 (12:15 +0000)]
Remove __ASSUME_FALLOCATE.

Given current Linux kernel version requirements, we can always assume
the fallocate syscall to be available.  This patch removes
__ASSUME_FALLOCATE and a test for whether __NR_fallocate is defined.

Tested for x86_64 and x86 that installed stripped shared libraries are
unchanged by the patch.

* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_FALLOCATE):
Remove macro.
* sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c: Do not
include <kernel-features.h>.
[!__ASSUME_FALLOCATE]: Remove conditional code.
(posix_fallocate) [__NR_fallocate]: Make code unconditional.

8 years agoUse JUMPTARGET in x86-64 mathvec
H.J. Lu [Wed, 16 Mar 2016 21:24:01 +0000 (14:24 -0700)]
Use JUMPTARGET in x86-64 mathvec

When PLT may be used, JUMPTARGET should be used instead calling the
function directly.

* sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core_sse4.S
(_ZGVbN2v_cos_sse4): Use JUMPTARGET to call cos.
* sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core_avx2.S
(_ZGVdN4v_cos_avx2): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core_avx512.S
(_ZGVdN4v_cos): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core_sse4.S
(_ZGVbN2v_exp_sse4): Use JUMPTARGET to call exp.
* sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core_avx2.S
(_ZGVdN4v_exp_avx2): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core_avx512.S
(_ZGVdN4v_exp): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_log2_core_sse4.S
(_ZGVbN2v_log_sse4): Use JUMPTARGET to call log.
* sysdeps/x86_64/fpu/multiarch/svml_d_log4_core_avx2.S
(_ZGVdN4v_log_avx2): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_log8_core_avx512.S
(_ZGVdN4v_log): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core_sse4.S
(_ZGVbN2vv_pow_sse4): Use JUMPTARGET to call pow.
* sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core_avx2.S
(_ZGVdN4vv_pow_avx2): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core_avx512.S
(_ZGVdN4vv_pow): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core_sse4.S
(_ZGVbN2v_sin_sse4): Use JUMPTARGET to call sin.
* sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core_avx2.S
(_ZGVdN4v_sin_avx2): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core_avx512.S
(_ZGVdN4v_sin): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core_sse4.S
(_ZGVbN2vvv_sincos_sse4): Use JUMPTARGET to call sin and cos.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core_avx2.S
(_ZGVdN4vvv_sincos_avx2): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core_avx512.S
(_ZGVdN4vvv_sincos): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_cosf16_core_avx512.S
(_ZGVdN8v_cosf): Use JUMPTARGET to call cosf.
* sysdeps/x86_64/fpu/multiarch/svml_s_cosf4_core_sse4.S
(_ZGVbN4v_cosf_sse4): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_cosf8_core_avx2.S
(_ZGVdN8v_cosf_avx2): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_expf16_core_avx512.S
(_ZGVdN8v_expf): Use JUMPTARGET to call expf.
* sysdeps/x86_64/fpu/multiarch/svml_s_expf4_core_sse4.S
(_ZGVbN4v_expf_sse4): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_expf8_core_avx2.S
(_ZGVdN8v_expf_avx2): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_logf16_core_avx512.S
(_ZGVdN8v_logf): Use JUMPTARGET to call logf.
* sysdeps/x86_64/fpu/multiarch/svml_s_logf4_core_sse4.S
(_ZGVbN4v_logf_sse4): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_logf8_core_avx2.S
(_ZGVdN8v_logf_avx2): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_powf16_core_avx512.S
(_ZGVdN8vv_powf): Use JUMPTARGET to call powf.
* sysdeps/x86_64/fpu/multiarch/svml_s_powf4_core_sse4.S
(_ZGVbN4vv_powf_sse4): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_powf8_core_avx2.S
(_ZGVdN8vv_powf_avx2): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_sincosf16_core_avx512.S
(_ZGVdN8vv_powf): Use JUMPTARGET to call sinf and cosf.
* sysdeps/x86_64/fpu/multiarch/svml_s_sincosf4_core_sse4.S
(_ZGVbN4vvv_sincosf_sse4): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_sincosf8_core_avx2.S
(_ZGVdN8vvv_sincosf_avx2): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_sinf16_core_avx512.S
(_ZGVdN8v_sinf): Use JUMPTARGET to call sinf.
* sysdeps/x86_64/fpu/multiarch/svml_s_sinf4_core_sse4.S
(_ZGVbN4v_sinf_sse4): Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_s_sinf8_core_avx2.S
(_ZGVdN8v_sinf_avx2): Likewise.
* sysdeps/x86_64/fpu/svml_d_wrapper_impl.h (WRAPPER_IMPL_SSE2):
Use JUMPTARGET to call callee.
(WRAPPER_IMPL_SSE2_ff): Likewise.
(WRAPPER_IMPL_SSE2_fFF): Likewise.
(WRAPPER_IMPL_AVX): Likewise.
(WRAPPER_IMPL_AVX_ff): Likewise.
(WRAPPER_IMPL_AVX_fFF): Likewise.
(WRAPPER_IMPL_AVX512): Likewise.
(WRAPPER_IMPL_AVX512_ff): Likewise.
* sysdeps/x86_64/fpu/svml_s_wrapper_impl.h (WRAPPER_IMPL_SSE2):
Likewise.
(WRAPPER_IMPL_SSE2_ff): Likewise.
(WRAPPER_IMPL_SSE2_fFF): Likewise.
(WRAPPER_IMPL_AVX): Likewise.
(WRAPPER_IMPL_AVX_ff): Likewise.
(WRAPPER_IMPL_AVX_fFF): Likewise.
(WRAPPER_IMPL_AVX512): Likewise.
(WRAPPER_IMPL_AVX512_ff): Likewise.
(WRAPPER_IMPL_AVX512_fFF): Likewise.

8 years agoadd ChangeLog entry
Mike Frysinger [Wed, 16 Mar 2016 19:06:33 +0000 (15:06 -0400)]
add ChangeLog entry

8 years agolocaledata: use same comment_char/escape_char in these files
Mike Frysinger [Sat, 20 Feb 2016 07:31:07 +0000 (02:31 -0500)]
localedata: use same comment_char/escape_char in these files

These files are small and easy to convert to what most others use.

8 years agolocaledata: an_ES: fix case of lang_ab
Carlos O'Donell [Wed, 16 Mar 2016 04:54:56 +0000 (00:54 -0400)]
localedata: an_ES: fix case of lang_ab

This needs to be lowercase to match the local ISO 639 database.

8 years agoFix hurd build
Samuel Thibault [Wed, 16 Mar 2016 12:57:57 +0000 (13:57 +0100)]
Fix hurd build

* sysdeps/mach/hurd/openat.c (__openat): Add missing ellipsis.
* resolv/gai_sigqueue.c (__gai_sigqueue): Add missing internal_function
qualifier.
* /rt/aio_sigqueue.c (__aio_sigqueue): Add missing attribute_hidden
internal_function qualifiers.

8 years agoFix building glibc master with NDEBUG and --with-cpu.
Carlos O'Donell [Wed, 16 Mar 2016 03:16:47 +0000 (23:16 -0400)]
Fix building glibc master with NDEBUG and --with-cpu.

When building on i686, x86_64, and arm, and with NDEBUG, or --with-cpu
there are various variables and functions which are unused based on
these settings.

This patch marks all such variables with __attribute__((unused)) to
avoid the compiler warnings when building with the aformentioned
options.

8 years agoRemove __ASSUME_PPOLL.
Joseph Myers [Tue, 15 Mar 2016 21:11:07 +0000 (21:11 +0000)]
Remove __ASSUME_PPOLL.

With current kernel version requirements, the ppoll Linux syscall can
be assumed to be present on all architectures; this patch removes the
__ASSUME_PPOLL macro and conditionals on it and on whether __NR_ppoll
is defined.  (Note that the same can't yet be done for pselect,
because MicroBlaze only wired that up in the syscall table in 3.15.)

Tested for x86_64 and x86 that installed stripped shared libraries are
unchanged by the patch.

* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PPOLL):
Remove macro.
* sysdeps/unix/sysv/linux/ppoll.c: Do not include
<kernel-features.h>.
[__NR_ppoll]: Make code unconditional.
[!__ASSUME_PPOLL]: Remove conditional code.

8 years agoAdjust kernel-features.h defaults for socket syscalls.
Joseph Myers [Tue, 15 Mar 2016 21:09:33 +0000 (21:09 +0000)]
Adjust kernel-features.h defaults for socket syscalls.

This patch adjusts the defaults for kernel-features.h macros relating
to availability of accept4, recvmmsg and sendmmsg.  It is not intended
to affect which macros end up getting defined in any configuration.

At present, all architectures with syscalls for those functions need
to define __ASSUME_*_SYSCALL macros; in particular, any new
architecture needs its own kernel-features.h file for that purpose,
though it may not otherwise need such a header.  Those macros are then
used together with __ASSUME_SOCKETCALL to define macros for whether
the functions in question are available.

This patch changes the defaults so that the syscalls are assumed to be
available by default with recent-enough kernels, and it is the
responsibility of architecture headers to undefine the macros if they
are unavailable in supported kernels at least as recent as the version
where the architecture-independent functionality was introduced.  The
__ASSUME_<function> macros are defaulted similarly instead of being
defined based on other macros (defining based on other macros would no
longer work because the #undefs appear after the generic header is
included), so where the syscall being unavailable means the function
is unavailable this means the architecture header has to undefine the
__ASSUME_<function> macro; this only affects __ASSUME_ACCEPT4 for
ia64, as other cases where the syscalls were added late enough to be
relevant with current kernel version requirements are all on
socketcall architectures.

As a consequence, the AArch64 and Nios II kernel-features.h header
files are removed, and others simplified.  When the minimum kernel
version becomes 4.3 or later on all architectures, the syscalls in
question can just be assumed unconditionally, permitting further
simplification.

Tested for x86_64, x86 and powerpc (that installed shared libraries
are unchanged by the patch, and testsuite for x86_64 and x86).

* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Define unconditionally.
(__ASSUME_ACCEPT4): Likewise.
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
Define.
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG):
Likewise.
* sysdeps/unix/sysv/linux/aarch64/kernel-features.h: Remove file.
* sysdeps/unix/sysv/linux/nios2/kernel-features.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_RECVMMSG_SYSCALL): Do not define.
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/arm/kernel-features.h
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/i386/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL):
Likewise.
(__ASSUME_ACCEPT4_SYSCALL): Undefine if [__LINUX_KERNEL_VERSION <
0x040300] instead of defining if [__LINUX_KERNEL_VERSION >=
0x040300].
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
(__ASSUME_RECVMMSG_SYSCALL): Do not define.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
(__ASSUME_ACCEPT4_SYSCALL): Undefine if [__LINUX_KERNEL_VERSION <
0x030300] instead of defining if [__LINUX_KERNEL_VERSION >=
0x030300].
[__LINUX_KERNEL_VERSION < 0x030300] (__ASSUME_ACCEPT4): Undefine.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Undefine if [__LINUX_KERNEL_VERSION <
0x040300] instead of defining if [__LINUX_KERNEL_VERSION >=
0x040300].
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Do not define.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Undefine if [__LINUX_KERNEL_VERSION <
0x030300] instead of defining if [__LINUX_KERNEL_VERSION >=
0x030300].
* sysdeps/unix/sysv/linux/mips/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Do not define.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/s390/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Undefine if [__LINUX_KERNEL_VERSION <
0x040300] instead of defining if [__LINUX_KERNEL_VERSION >=
0x040300].
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/sh/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Do not define.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/sparc/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/tile/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/x86_64/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL):
Likewise.

8 years agoFix resource leak in resolver (bug 19257)
Andreas Schwab [Wed, 18 Nov 2015 14:45:59 +0000 (15:45 +0100)]
Fix resource leak in resolver (bug 19257)

The number of currently defined nameservers is stored in ->nscount,
whereas ->_u._ext.nscount is set by __libc_res_nsend only after local
initializations.

8 years agoFix compilation of test-signgam-* tests
Andreas Schwab [Mon, 14 Mar 2016 23:00:07 +0000 (00:00 +0100)]
Fix compilation of test-signgam-* tests

8 years agoUpdate glibc headers for Linux 4.5.
Joseph Myers [Mon, 14 Mar 2016 19:04:53 +0000 (19:04 +0000)]
Update glibc headers for Linux 4.5.

This patch updates the glibc headers with the defines MADV_FREE,
IPV6_HDRINCL and EPOLLEXCLUSIVE that are added in Linux 4.5.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

* bits/mman-linux.h [__USE_MISC] (MADV_FREE): New macro.
* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_MISC]
(MADV_FREE): Likewise.
* sysdeps/unix/sysv/linux/bits/in.h (IPV6_HDRINCL): Likewise.
* sysdeps/unix/sysv/linux/sys/epoll.h (enum EPOLL_EVENTS): Add
EPOLLEXCLUSIVE.

8 years agoRemove mention of checktab.awk in timezone/README.
Carlos O'Donell [Mon, 14 Mar 2016 18:10:57 +0000 (14:10 -0400)]
Remove mention of checktab.awk in timezone/README.

8 years agoFix flag test in waitid compatibility layer
Samuel Thibault [Sun, 13 Mar 2016 20:44:09 +0000 (21:44 +0100)]
Fix flag test in waitid compatibility layer

* sysdeps/posix/waitid.c (OUR_WAITID): Test against WSTOPPED instead of
WUNTRACED.

8 years agoFix type of parameter passed by malloc_consolidate
Tulio Magno Quites Machado Filho [Fri, 11 Mar 2016 19:57:38 +0000 (16:57 -0300)]
Fix type of parameter passed by malloc_consolidate

atomic_exchange_acq() expected a pointer, but was receiving an integer.

8 years agopowerpc: Rearrange cfi_offset calls
Rajalakshmi Srinivasaraghavan [Tue, 23 Feb 2016 05:40:34 +0000 (11:10 +0530)]
powerpc: Rearrange cfi_offset calls

This patch rearranges cfi_offset() calls after the last store
so as to avoid extra DW_CFA_advance opcodes in unwind information.

8 years agoRemoved unused timezone/checktab.awk.
Carlos O'Donell [Fri, 11 Mar 2016 04:17:09 +0000 (23:17 -0500)]
Removed unused timezone/checktab.awk.

8 years agoAllow spurious underflow / inexact for ldbl-128ibm.
Joseph Myers [Thu, 10 Mar 2016 23:48:46 +0000 (23:48 +0000)]
Allow spurious underflow / inexact for ldbl-128ibm.

A large number of the test-ldouble failures seen for ldbl-128ibm are
spurious "underflow" and "inexact" exceptions.  These arise from such
exceptions in the underlying arithmetic; unlike other spurious
exceptions from that arithmetic, they do not in general relate to
cases where the returned result is also substantially inaccurate, are
not so readily avoidable by appropriately conditional libgcc patches,
and are widespread enough to be hard to handle through individual
XFAILing of the affected tests.

Thus, this patch documents relaxed accuracy goals for libm functions
for IBM long double and makes libm-test.inc reflect these spurious
exceptions in ldbl-128ibm arithmetic and always allow them in
ldbl-128ibm testing (while still not allowing these exceptions to be
missing where required to be present).  Tested for powerpc.

* manual/math.texi (Errors in Math Functions): Document relaxed
accuracy goals for IBM long double.
* math/libm-test.inc (test_exceptions): Always allow spurious
"underflow" and "inexact" exceptions for IBM long double.

8 years agoAdd _arch_/_cpu_ to index_*/bit_* in x86 cpu-features.h
H.J. Lu [Thu, 10 Mar 2016 13:26:46 +0000 (05:26 -0800)]
Add _arch_/_cpu_ to index_*/bit_* in x86 cpu-features.h

index_* and bit_* macros are used to access cpuid and feature arrays o
struct cpu_features.  It is very easy to use bits and indices of cpuid
array on feature array, especially in assembly codes.  For example,
sysdeps/i386/i686/multiarch/bcopy.S has

HAS_CPU_FEATURE (Fast_Rep_String)

which should be

HAS_ARCH_FEATURE (Fast_Rep_String)

We change index_* and bit_* to index_cpu_*/index_arch_* and
bit_cpu_*/bit_arch_* so that we can catch such error at build time.

[BZ #19762]
* sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
(EXTRA_LD_ENVVARS): Add _arch_ to index_*/bit_*.
* sysdeps/x86/cpu-features.c (init_cpu_features): Likewise.
* sysdeps/x86/cpu-features.h (bit_*): Renamed to ...
(bit_arch_*): This for feature array.
(bit_*): Renamed to ...
(bit_cpu_*): This for cpu array.
(index_*): Renamed to ...
(index_arch_*): This for feature array.
(index_*): Renamed to ...
(index_cpu_*): This for cpu array.
[__ASSEMBLER__] (HAS_FEATURE): Add and use field.
[__ASSEMBLER__] (HAS_CPU_FEATURE)): Pass cpu to HAS_FEATURE.
[__ASSEMBLER__] (HAS_ARCH_FEATURE)): Pass arch to HAS_FEATURE.
[!__ASSEMBLER__] (HAS_CPU_FEATURE): Replace index_##name and
bit_##name with index_cpu_##name and bit_cpu_##name.
[!__ASSEMBLER__] (HAS_ARCH_FEATURE): Replace index_##name and
bit_##name with index_arch_##name and bit_arch_##name.

8 years agomips: terminate the FDE before the return trampoline in makecontext
Aurelien Jarno [Tue, 8 Mar 2016 23:25:00 +0000 (00:25 +0100)]
mips: terminate the FDE before the return trampoline in makecontext

In makecontext the FDE needs to be terminated before the return
trampoline otherwise backtrace called within a context created by
makecontext yields infinite backtrace.

This bug has been present for a long time, stdlib/tst-makecontext did
not fail until recent commit e535ce25. Tested on mips-linux-gnu and
mips64el-linux-gnuabi64 and mips-linux-gnu, no regression.

This fixes stdlib/tst-makecontext on MIPS.

Changelog:
[BZ #19792]
* sysdeps/unix/sysv/linux/mips/makecontext.S (__makecontext):
Terminate FDE before return label.

8 years agoFix ldbl-128ibm nearbyintl in non-default rounding modes (bug 19790).
Joseph Myers [Wed, 9 Mar 2016 00:30:59 +0000 (00:30 +0000)]
Fix ldbl-128ibm nearbyintl in non-default rounding modes (bug 19790).

The ldbl-128ibm implementation of nearbyintl uses logic that only
works in round-to-nearest mode.  This contrasts with rintl, which
works in all rounding modes.

Now, arguably nearbyintl could simply be aliased to rintl, given that
spurious "inexact" is generally allowed for ldbl-128ibm, even for the
underlying arithmetic operations.  But given that the only point of
nearbyintl is to avoid "inexact", this patch follows the more
conservative approach of adding conditionals to the rintl
implementation to make it suitable for use to implement nearbyintl,
then builds it for nearbyintl with USE_AS_NEARBYINTL defined.  The
test test-nearbyint-except-2 shows up issues when traps on "inexact"
are enabled, which turn out to be problems with the powerpc
fenv_private.h implementation (two functions that should disable
exception traps potentially failing to do so in some cases); this
patch duly fixes that as well (I don't see any other existing cases
where this would be user-visible; there isn't much use of *_NOEX,
*hold* etc. in libm that requires exceptions to be discarded and not
trapped on).

Tested for powerpc.

[BZ #19790]
* sysdeps/ieee754/ldbl-128ibm/s_rintl.c [USE_AS_NEARBYINTL]
(rintl): Define as macro.
[USE_AS_NEARBYINTL] (__rintl): Likewise.
(__rintl) [USE_AS_NEARBYINTL]: Use SET_RESTORE_ROUND_NOEX instead
of fesetround.  Ensure results are evaluated before end of scope.
* sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: Define
USE_AS_NEARBYINTL and include s_rintl.c.
* sysdeps/powerpc/fpu/fenv_private.h (libc_feholdsetround_ppc):
Disable exception traps in new environment.
(libc_feholdsetround_ppc_ctx): Likewise.

8 years agoFix tst-audit10 build when -mavx512f is not supported.
Roland McGrath [Tue, 8 Mar 2016 20:31:13 +0000 (12:31 -0800)]
Fix tst-audit10 build when -mavx512f is not supported.

8 years agoAdd sys/auxv.h wrapper to include/sys/
Aurelien Jarno [Tue, 8 Mar 2016 14:16:40 +0000 (15:16 +0100)]
Add sys/auxv.h wrapper to include/sys/

The GNU libc testsuite fails to build on powerpc/ppc64/ppc64le with the
following error:

    ../sysdeps/powerpc/test-get_hwcap.c:26:22: fatal error: sys/auxv.h: No such file or director

This is because test-get_hwcap.c includes <sys/auxv.h>, but we don't
provide a wrapper in include/sys. This patch adds one.

Changelog:
* include/sys/auxv.h: New file.

8 years agoDefine _HAVE_STRING_ARCH_mempcpy to 1 for x86
H.J. Lu [Tue, 8 Mar 2016 18:57:31 +0000 (10:57 -0800)]
Define _HAVE_STRING_ARCH_mempcpy to 1 for x86

Since x86 has an optimized mempcpy and GCC can inline mempcpy on x86,
define _HAVE_STRING_ARCH_mempcpy to 1 for x86.

[BZ #19759]
* sysdeps/x86/bits/string.h (_HAVE_STRING_ARCH_mempcpy): New.

8 years agopowerpc: Remove uses of operand modifier (%s) in inline asm
Gabriel F. T. Gomes [Fri, 22 Jan 2016 20:05:05 +0000 (18:05 -0200)]
powerpc: Remove uses of operand modifier (%s) in inline asm

The operand modifier %s on powerpc is an undocumented internal implementation
detail of GCC.  Besides that, the GCC community wants to remove it.  This patch
rewrites the expressions that use this modifier with logically equivalent
expressions that don't require it.

Explanation for the substitution:

The %s modifier takes an immediate operand and prints 32 less such immediate.
Thus, in the previous code, the expression resulted in:

  32 - __builtin_ffs(e)

where e was guaranteed to have exactly a single bit set, by the following
expressions:

  (e & (e-1) == 0) : e has at most one bit set.
  (e != 0)         : e is not zero, thus it has at least one bit set.

Since we guarantee that there is exactly only one bit set, the following
statement is true:

  32 - __builtin_ffs(e) == __builtin_clz(e)

Thus, we can replace __builtin_ffs with __builtin_clz and remove the %s operand
modifier.

8 years agopowerpc: Fix dl-procinfo HWCAP
Carlos Eduardo Seo [Mon, 28 Dec 2015 18:36:46 +0000 (16:36 -0200)]
powerpc: Fix dl-procinfo HWCAP

HWCAP-related code should had been updated when the 32 bits of HWCAP were
used.  This patch updates the code in dl-procinfo.h to loop through all
the 32 bits in HWCAP and updates _dl_powerpc_cap_flags accordingly.

8 years agoSupport --enable-hardcoded-path-in-tests in benchtests
H.J. Lu [Tue, 8 Mar 2016 12:53:24 +0000 (04:53 -0800)]
Support --enable-hardcoded-path-in-tests in benchtests

benchtests should use $(test-via-rtld-prefix) and $(+link-tests) like
other glibc tests.

[BZ #19783]
* benchtests/Makefile (run-bench): Replace $(rtld-prefix) with
$(test-via-rtld-prefix).
($(binaries-bench)): Replace $(+link) with $(+link-tests).

8 years agosunrpc: In key_call_keyenvoy, use int status instead of union wait
Florian Weimer [Tue, 8 Mar 2016 09:04:23 +0000 (10:04 +0100)]
sunrpc: In key_call_keyenvoy, use int status instead of union wait

8 years agoposix: Fix tst-execvpe5 for --enable-hardcoded-path-in-tests
Adhemerval Zanella [Tue, 8 Mar 2016 02:30:38 +0000 (09:30 +0700)]
posix: Fix tst-execvpe5 for --enable-hardcoded-path-in-tests

This patch fixes the posix/tst-execvpe5 invocation when GLIBC is
configured with --enable-hardcoded-path-in-tests which fails with:

$ cat  posix/tst-execvpe5.out
Wrong number of arguments (4)

Checked on x86-64 and powerpc64le.

* posix/tst-execvpe5.c (do_test): Fix fix test invocation when
configured with --enable-hardcoded-path-in-tests.

8 years agoFix ldbl-128ibm remainderl equality test for zero low part (bug 19677).
Joseph Myers [Tue, 8 Mar 2016 00:27:21 +0000 (00:27 +0000)]
Fix ldbl-128ibm remainderl equality test for zero low part (bug 19677).

The ldbl-128ibm implementation of remainderl has logic resulting in
incorrect tests for equality of the absolute values of the arguments
in the case of zero low parts.  If the low parts are both zero but
with different signs, this can wrongly cause equal arguments to be
treated as different, resulting in turn in incorrect signs of zero
result in nondefault rounding modes arising from the subtractions done
when the arguments are not equal.

This patch fixes the logic to convert -0 low parts into +0 before the
comparison (remquo already has separate logic to deal with signs of
zero results, so doesn't need such a change).  Tests are added for
remainderl and remquol similar to that for fmodl, and based on a
refactoring of it, since the bug depends on low parts which should not
be relied upon in tests not setting the representation explicitly
(although in fact the bug shows up in test-ldouble with current GCC).
Tested for powerpc.

[BZ #19677]
* sysdeps/ieee754/ldbl-128ibm/e_remainderl.c
(__ieee754_remainderl): Put zero low parts in canonical form.
* sysdeps/ieee754/ldbl-128ibm/test-fmodrem-ldbl-128ibm.c: New
file.  Based on
sysdeps/ieee754/ldbl-128ibm/test-fmodl-ldbl-128ibm.c.
* sysdeps/ieee754/ldbl-128ibm/test-fmodl-ldbl-128ibm.c: Replace
with wrapper round test-fmodrem-ldbl-128ibm.c.
* sysdeps/ieee754/ldbl-128ibm/test-remainderl-ldbl-128ibm.c: New
file.
* sysdeps/ieee754/ldbl-128ibm/test-remquol-ldbl-128ibm.c:
Likewise.
* sysdeps/ieee754/ldbl-128ibm/Makefile (tests): Add
test-remainderl-ldbl-128ibm and test-remquol-ldbl-128ibm.

8 years agoldconfig: Do not remove stale symbolic links with -X [BZ #19610]
Florian Weimer [Mon, 7 Mar 2016 21:06:18 +0000 (22:06 +0100)]
ldconfig: Do not remove stale symbolic links with -X [BZ #19610]

8 years agolink sln fix to bugzilla [BZ #15333]
Mike Frysinger [Mon, 7 Mar 2016 18:23:24 +0000 (13:23 -0500)]
link sln fix to bugzilla [BZ #15333]

8 years agoFix min/max needed for ascii to INTERNAL conversion
Andreas Schwab [Mon, 17 Aug 2015 10:32:12 +0000 (12:32 +0200)]
Fix min/max needed for ascii to INTERNAL conversion

8 years agosln: use stat64
Hongjiu Zhang [Mon, 7 Mar 2016 01:18:21 +0000 (20:18 -0500)]
sln: use stat64

When using sln on some filesystems which return 64-bit inodes,
the stat call might fail during install like so:
.../elf/sln .../elf/symlink.list
/lib32/libc.so.6: invalid destination: Value too large for defined data type
/lib32/ld-linux.so.2: invalid destination: Value too large for defined data type
Makefile:104: recipe for target 'install-symbolic-link' failed

Switch to using stat64 all the time to avoid this.

URL: https://bugs.gentoo.org/576396

8 years agolibio: Clean up _IO_file_doallocate and _IO_wfile_doallocate
Florian Weimer [Mon, 7 Mar 2016 16:05:06 +0000 (17:05 +0100)]
libio: Clean up _IO_file_doallocate and _IO_wfile_doallocate

No functional changes.

8 years agotst-audit4, tst-audit10: Compile AVX/AVX-512 code separately [BZ #19269]
Florian Weimer [Mon, 7 Mar 2016 15:00:25 +0000 (16:00 +0100)]
tst-audit4, tst-audit10: Compile AVX/AVX-512 code separately [BZ #19269]

This ensures that GCC will not use unsupported instructions before
the run-time check to ensure support.

8 years agotest-skeleton.c: Do not set RLIMIT_DATA [BZ #19648]
Florian Weimer [Mon, 7 Mar 2016 12:48:47 +0000 (13:48 +0100)]
test-skeleton.c: Do not set RLIMIT_DATA [BZ #19648]

With older kernels, it is mostly ineffective because it causes malloc
to switch from sbrk to mmap (potentially invalidating malloc testing
compared to what real appliations do).  With newer kernels which
have switched to enforcing RLIMIT_DATA for mmap as well, some test
cases will fail in an unintended fashion because the limit which was
set previously does not include room for all mmap mappings.

8 years agoposix: New Linux posix_spawn{p} implementation
Adhemerval Zanella [Tue, 19 Jan 2016 19:33:32 +0000 (17:33 -0200)]
posix: New Linux posix_spawn{p} implementation

This patch implements a new posix_spawn{p} implementation for Linux.  The main
difference is it uses the clone syscall directly with CLONE_VM and CLONE_VFORK
flags and a direct allocated stack.  The new stack and start function solves
most the vfork limitation (possible parent clobber due stack spilling).  The
remaning issue are related to signal handling:

  1. That no signal handlers must run in child context, to avoid corrupt
     parent's state.
  2. Child must synchronize with parent to enforce stack deallocation and
     to possible return execv issues.

The first one is solved by blocking all signals in child, even NPTL-internal
ones (SIGCANCEL and SIGSETXID).  The second issue is done by a stack allocation
in parent and a synchronization with using a pipe or waitpid (in case or error).
The pipe has the advantage of allowing the child signal an exec error (checked
with new tst-spawn2 test).

There is an inherent race condition in pipe2 usage for architectures that do not
support the syscall directly.  In such cases the a pipe plus fctnl is used
instead and it may lead to file descriptor leak in parent (as decribed by fcntl
documentation).

The child process stack is allocate with a mmap with MAP_STACK flag using
default architecture stack size.  Although it is slower than use a stack buffer
from parent, it allows some slack for the compatibility code to run scripts
with no shebang (which may use a buffer with size depending of argument list
count).

Performance should be similar to the vfork default posix implementation and
way faster than fork path (vfork on mostly linux ports are basically
clone with CLONE_VM plus CLONE_VFORK).  The only difference is the syscalls
required for the stack allocation/deallocation.

It fixes BZ#10354, BZ#14750, and BZ#18433.

Tested on i386, x86_64, powerpc64le, and aarch64.

[BZ #14750]
[BZ #10354]
[BZ #18433]
* include/sched.h (__clone): Add hidden prototype.
(__clone2): Likewise.
* include/unistd.h (__dup): Likewise.
* posix/Makefile (tests): Add tst-spawn2.
* posix/tst-spawn2.c: New file.
* sysdeps/posix/dup.c (__dup): Add hidden definition.
* sysdeps/unix/sysv/linux/aarch64/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/alpha/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/hppa/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/i386/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/ia64/clone2.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/m68k/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/microblaze/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/mips/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/nios2/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S (__clone):
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S (__clone):
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/sh/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/tile/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/x86_64/clone.S (__clone): Likewise.
* sysdeps/unix/sysv/linux/nptl-signals.h
(____nptl_is_internal_signal): New function.
* sysdeps/unix/sysv/linux/spawni.c: New file.

8 years agoposix: execvpe cleanup
Adhemerval Zanella [Fri, 22 Jan 2016 11:58:49 +0000 (09:58 -0200)]
posix: execvpe cleanup

This patch removes all the dynamic allocation on execvpe code and
instead use direct stack allocation.  This is QoI approach to make
it possible use in scenarios where memory is shared with parent
(vfork or clone with CLONE_VM).

For default process spawn (script file without a shebang), stack
allocation is bounded by NAME_MAX plus PATH_MAX plus 1.  Large
file arguments returns an error (ENAMETOOLONG).  This differs than
current GLIBC pratice in general, but it used to limit stack
allocation for large inputs.  Also, path in PATH environment variable
larger than PATH_MAX are ignored.

The shell direct execution exeception, where execve returns ENOEXEC,
might requires a large stack allocation due large input argument list.

Tested on i686, x86_64, powerpc64le, and aarch64.

* posix/execvpe.c (__execvpe): Remove dynamic allocation.
* posix/Makefile (tests): Add tst-execvpe{1,2,3,4,5,6}.
* posix/tst-execvp1.c (do_test): Use a macro to call execvp.
* posix/tst-execvp2.c (do_test): Likewise.
* posix/tst-execvp3.c (do_test): Likewise.
* posix/tst-execvp4.c (do_test): Likewise.
* posix/tst-execvpe1.c: New file.
* posix/tst-execvpe2.c: Likewise.
* posix/tst-execvpe3.c: Likewise.
* posix/tst-execvpe4.c: Likewise.
* posix/tst-execvpe5.c: Likewise.
* posix/tst-execvpe6.c: Likewise.

8 years agoposix: Remove dynamic memory allocation from execl{e,p}
Adhemerval Zanella [Fri, 29 Jan 2016 13:43:40 +0000 (11:43 -0200)]
posix: Remove dynamic memory allocation from execl{e,p}

GLIBC execl{e,p} implementation might use malloc if the total number of
arguments exceed initial assumption size (1024).  This might lead to
issues in two situations:

1. execl/execle is stated to be async-signal-safe by POSIX [1].  However
   if execl is used in a signal handler with a large argument set (that
   may call malloc internally) and if the resulting call fails it might
   lead malloc in the program in a bad state.

2. If the functions are used in a vfork/clone(VFORK) situation it also
   might issue malloc internal bad state.

This patch fixes it by using stack allocation instead.  It also fixes
BZ#19534.

Tested on x86_64.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html

[BZ #19534]
* posix/execl.c (execl): Remove dynamic memory allocation.
* posix/execle.c (execle): Likewise.
* posix/execlp.c (execlp): Likewise.

8 years agoGroup AVX512 functions in .text.avx512 section
H.J. Lu [Mon, 7 Mar 2016 00:48:11 +0000 (16:48 -0800)]
Group AVX512 functions in .text.avx512 section

* sysdeps/x86_64/multiarch/memcpy-avx512-no-vzeroupper.S:
Replace .text with .text.avx512.
* sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S:
Likewise.

8 years agoAdd placeholder libnsl.abilist and libutil.abilist files
Aurelien Jarno [Sun, 6 Mar 2016 23:46:57 +0000 (00:46 +0100)]
Add placeholder libnsl.abilist and libutil.abilist files

Changelog:
* sysdeps/generic/libnsl.abilist: New file.
* sysdeps/generic/libutil.abilist: New file.

8 years agoUse HAS_ARCH_FEATURE with Fast_Rep_String
H.J. Lu [Sun, 6 Mar 2016 16:23:24 +0000 (08:23 -0800)]
Use HAS_ARCH_FEATURE with Fast_Rep_String

HAS_ARCH_FEATURE, not HAS_CPU_FEATURE, should be used with
Fast_Rep_String.

[BZ #19762]
* sysdeps/i386/i686/multiarch/bcopy.S (bcopy): Use
HAS_ARCH_FEATURE with Fast_Rep_String.
* sysdeps/i386/i686/multiarch/bzero.S (__bzero): Likewise.
* sysdeps/i386/i686/multiarch/memcpy.S (memcpy): Likewise.
* sysdeps/i386/i686/multiarch/memcpy_chk.S (__memcpy_chk):
Likewise.
* sysdeps/i386/i686/multiarch/memmove_chk.S (__memmove_chk):
Likewise.
* sysdeps/i386/i686/multiarch/mempcpy.S (__mempcpy): Likewise.
* sysdeps/i386/i686/multiarch/mempcpy_chk.S (__mempcpy_chk):
Likewise.
* sysdeps/i386/i686/multiarch/memset.S (memset): Likewise.
* sysdeps/i386/i686/multiarch/memset_chk.S (__memset_chk):
Likewise.

8 years agolocaledata: clear LC_IDENTIFICATION tel/fax fields
Mike Frysinger [Wed, 10 Feb 2016 00:51:59 +0000 (19:51 -0500)]
localedata: clear LC_IDENTIFICATION tel/fax fields

These fields aren't terribly useful and most don't set it.

8 years agoReplace PREINIT_FUNCTION@PLT with *%rax in call
H.J. Lu [Fri, 4 Mar 2016 23:36:18 +0000 (15:36 -0800)]
Replace PREINIT_FUNCTION@PLT with *%rax in call

Since we have loaded address of PREINIT_FUNCTION into %rax, we can
avoid extra branch to PLT slot.

[BZ #19745]
* sysdeps/x86_64/crti.S (_init): Replace PREINIT_FUNCTION@PLT
with *%rax in call.

8 years agoReplace @PLT with @GOTPCREL(%rip) in call
H.J. Lu [Fri, 4 Mar 2016 23:28:59 +0000 (15:28 -0800)]
Replace @PLT with @GOTPCREL(%rip) in call

Since __libc_start_main is called very early, lazy binding isn't relevant
here.  Use indirect branch via GOT to avoid extra branch to PLT slot.

[BZ #19745]
* sysdeps/x86_64/start.S (_start): __libc_start_main@PLT
with *__libc_start_main@GOTPCREL(%rip) in call.

8 years agoFix edito in last change.
Roland McGrath [Fri, 4 Mar 2016 23:45:35 +0000 (15:45 -0800)]
Fix edito in last change.

8 years agoConditionalize c++-types-check.out addition to tests-special.
Roland McGrath [Fri, 4 Mar 2016 23:07:12 +0000 (15:07 -0800)]
Conditionalize c++-types-check.out addition to tests-special.

8 years agoOmit test-math-isinff when no C++ compiler.
Roland McGrath [Fri, 4 Mar 2016 21:27:25 +0000 (13:27 -0800)]
Omit test-math-isinff when no C++ compiler.

8 years agoFix c++-types-check conditionalization.
Roland McGrath [Fri, 4 Mar 2016 21:22:00 +0000 (13:22 -0800)]
Fix c++-types-check conditionalization.

8 years agoAdd a comment in sysdeps/x86_64/Makefile
H.J. Lu [Fri, 4 Mar 2016 16:44:43 +0000 (08:44 -0800)]
Add a comment in sysdeps/x86_64/Makefile

Mention recursive calls when ENTRY is used in _mcount.S.

* sysdeps/x86_64/Makefile (sysdep_noprof): Add a comment.

8 years agox86-64: Fix memcpy IFUNC selection
H.J. Lu [Fri, 4 Mar 2016 16:37:40 +0000 (08:37 -0800)]
x86-64: Fix memcpy IFUNC selection

Chek Fast_Unaligned_Load, instead of Slow_BSF, and also check for
Fast_Copy_Backward to enable __memcpy_ssse3_back.  Existing selection
order is updated with following selection order:

1. __memcpy_avx_unaligned if AVX_Fast_Unaligned_Load bit is set.
2. __memcpy_sse2_unaligned if Fast_Unaligned_Load bit is set.
3. __memcpy_sse2 if SSSE3 isn't available.
4. __memcpy_ssse3_back if Fast_Copy_Backward bit it set.
5. __memcpy_ssse3

[BZ #18880]
* sysdeps/x86_64/multiarch/memcpy.S: Check Fast_Unaligned_Load,
instead of Slow_BSF, and also check for Fast_Copy_Backward to
enable __memcpy_ssse3_back.

8 years agoGratuitous change to poke buildbot.
Roland McGrath [Fri, 4 Mar 2016 00:48:09 +0000 (16:48 -0800)]
Gratuitous change to poke buildbot.

8 years agoOr bit_Prefer_MAP_32BIT_EXEC in EXTRA_LD_ENVVARS
H.J. Lu [Thu, 3 Mar 2016 22:51:40 +0000 (14:51 -0800)]
Or bit_Prefer_MAP_32BIT_EXEC in EXTRA_LD_ENVVARS

We should turn on bit_Prefer_MAP_32BIT_EXEC in EXTRA_LD_ENVVARS without
overriding other bits.

[BZ #19758]
* sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h
(EXTRA_LD_ENVVARS): Or bit_Prefer_MAP_32BIT_EXEC.

8 years agoTypo fixes.
Roland McGrath [Thu, 3 Mar 2016 21:48:07 +0000 (13:48 -0800)]
Typo fixes.

8 years ago2016-03-03 Paul Pluzhnikov <ppluzhnikov@google.com>
Paul Pluzhnikov [Thu, 3 Mar 2016 17:53:49 +0000 (09:53 -0800)]
2016-03-03  Paul Pluzhnikov  <ppluzhnikov@google.com>

[BZ #19490]
* sysdeps/x86_64/_mcount.S (_mcount): Add unwind descriptor.
(__fentry__): Likewise

8 years agoCopy x86_64 _mcount.op from _mcount.o
H.J. Lu [Thu, 3 Mar 2016 14:55:59 +0000 (06:55 -0800)]
Copy x86_64 _mcount.op from _mcount.o

No need to compile x86_64 _mcount.S with -pg.  We can just copy the
normal static object.

* gmon/Makefile (noprof): Add $(sysdep_noprof).
* sysdeps/x86_64/Makefile (sysdep_noprof): Add _mcount.

8 years agoCall x86-64 __mcount_internal/__sigjmp_save directly
H.J. Lu [Wed, 2 Mar 2016 00:58:07 +0000 (16:58 -0800)]
Call x86-64 __mcount_internal/__sigjmp_save directly

Since __mcount_internal and __sigjmp_save are internal to x86-64 libc.so:

3532: 0000000000104530   289 FUNC    LOCAL  DEFAULT   13 __mcount_internal
3391: 0000000000034170    38 FUNC    LOCAL  DEFAULT   13 __sigjmp_save

they can be called directly without PLT.

* sysdeps/x86_64/_mcount.S (C_LABEL(_mcount)): Call
__mcount_internal directly.
(C_LABEL(__fentry__)): Likewise.
* sysdeps/x86_64/setjmp.S __sigsetjmp): Call __sigjmp_save
directly.

8 years agoCall x86-64 __setcontext directly
H.J. Lu [Wed, 2 Mar 2016 00:55:36 +0000 (16:55 -0800)]
Call x86-64 __setcontext directly

Since x86-64 __start_context calls the internal __setcontext:

5089: 00000000000417e0   145 FUNC    LOCAL  DEFAULT   13 __setcontext

it should call __setcontext directly.

* sysdeps/unix/sysv/linux/x86_64/__start_context.S
(__start_context): Call __setcontext directly.

8 years agolocaledata: es_PR: change LC_MEASUREMENT to metric
Mike Frysinger [Tue, 9 Feb 2016 20:39:03 +0000 (15:39 -0500)]
localedata: es_PR: change LC_MEASUREMENT to metric

Puerto Rico uses the metric system and has for a long time.
https://en.wikipedia.org/wiki/Puerto_Rican_units_of_measurement

8 years agolocaledata: an_ES: fix lang_ab value
Mike Frysinger [Sat, 20 Feb 2016 04:25:03 +0000 (23:25 -0500)]
localedata: an_ES: fix lang_ab value

Aragonese is classified as "an" so set it.

8 years agoRemove kernel-features.h conditionals on pre-3.2 kernels.
Joseph Myers [Fri, 26 Feb 2016 16:17:25 +0000 (16:17 +0000)]
Remove kernel-features.h conditionals on pre-3.2 kernels.

This patch follows up on the increase in minimum kernel version by
removing conditionals in non-x86, non-x86_64 kernel-features.h headers
that are now constant for all supported kernel versions.

* sysdeps/unix/sysv/linux/alpha/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x030200]: Likewise.
[__LINUX_KERNEL_VERSION < 0x020621]: Remove conditional code.
* sysdeps/unix/sysv/linux/arm/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x020624]: Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020622]: Likewise.
[__LINUX_KERNEL_VERSION >= 0x030100]: Likewise.
[__LINUX_KERNEL_VERSION < 0x020625]: Remove conditional code.
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
[__LINUX_KERNEL_VERSION < 0x030000]: Remove conditional code.
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION < 0x020621]: Remove conditional code.
[__LINUX_KERNEL_VERSION < 0x020625]: Likewise.
* sysdeps/unix/sysv/linux/mips/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x030100]: Likewise.
[_MIPS_SIM == _ABIN32 && __LINUX_KERNEL_VERSION < 0x020623]:
Remove conditional code.
* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020625]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
* sysdeps/unix/sysv/linux/sh/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020625]: Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
[__LINUX_KERNEL_VERSION < 0x020625]: Remove conditional code.
* sysdeps/unix/sysv/linux/sparc/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
* sysdeps/unix/sysv/linux/tile/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.

8 years agoNEWS (2.23): Fix typo in bug 19048 text.
Carlos O'Donell [Thu, 25 Feb 2016 03:04:13 +0000 (22:04 -0500)]
NEWS (2.23): Fix typo in bug 19048 text.

8 years agoEnable --localedir to set message catalog directory (Bug 14259)
Carlos O'Donell [Thu, 25 Feb 2016 01:06:04 +0000 (20:06 -0500)]
Enable --localedir to set message catalog directory (Bug 14259)

In 1999 the project split "localedir" into "localedir" (path to compiled
locale archives) and "msgcatdir" (path to message catalogs). This
predates the 2002 change in the GNU Coding Standard to document the use
of "localedir" for the path to the message catalogs. It appears that
newlib, gcc, and several other projects also used "msgcatdir" at one
point or another in the past, and so it is in line with historical
precedent that glibc would also use "msgcatdir." However, given that the
GNU Coding Standard uses "localedir", we will switch to that for
consistency as a GNU project. Previous uses of --localdir didn't work
anyway (see bug 14259).

I am committing this patch in the understanding that nobody would object
to fixing #14259 as part of aligning our variable usage to the GNU
Coding Standard.

Given that previous "localedir" uses were converted to "complocaledir"
by [1], we can now convert "msgcatdir" to "localedir" and complete the
transition. With an addition to config.make.in we also fix bug 14259 and
allow users to specify the locale dependent data directory with
"--localedir" at configure time. There is still no way to control at
configure time the location of the *compiled* locale directory.

Tested on x86_64 with no regressions.

Tested using "--localedir" to specify alternate locale dependent data
directory and verified with "make install DESTDIR=/tmp/glibc".

[1] 90fe682d3067163aa773feecf497ef599429457a

8 years agoGB 18030-2005: Document non-rountrip and PUA mappings (bug 19575).
Carlos O'Donell [Wed, 24 Feb 2016 19:31:35 +0000 (14:31 -0500)]
GB 18030-2005: Document non-rountrip and PUA mappings (bug 19575).

8 years agoRemove linux/fanotify.h configure test.
Joseph Myers [Wed, 24 Feb 2016 18:44:10 +0000 (18:44 +0000)]
Remove linux/fanotify.h configure test.

Now we require Linux 3.2 or later kernel headers everywhere, the
configure test for <linux/fanotify.h> is obsolete; this patch removes
it.

Tested for x86_64.

* sysdeps/unix/sysv/linux/configure.ac (linux/fanotify.h): Do not
test for header.
* sysdeps/unix/sysv/linux/configure: Regenerated.
* config.h.in (HAVE_LINUX_FANOTIFY_H): Remove #undef.
* sysdeps/unix/sysv/linux/tst-fanotify.c [!HAVE_LINUX_FANOTIFY_H]:
Remove conditional code.
[HAVE_LINUX_FANOTIFY_H]: Make code unconditional.

8 years agoRequire Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere.
Joseph Myers [Wed, 24 Feb 2016 17:15:12 +0000 (17:15 +0000)]
Require Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere.

In <https://sourceware.org/ml/libc-alpha/2016-01/msg00885.html> I
proposed a minimum Linux kernel version of 3.2 for glibc 2.24, since
Linux 2.6.32 has reached EOL.

In the discussion in February, some concerns were expressed about
compatibility with OpenVZ containers.  It's not clear that these are
real issues, given OpenVZ backporting kernel features and faking the
kernel version for guest software, as discussed in
<https://sourceware.org/ml/libc-alpha/2016-02/msg00278.html>.  It's
also not clear that supporting running GNU/Linux distributions from
late 2016 (at the earliest) on a kernel series from 2009 is a sensible
expectation.  However, as an interim step, this patch increases the
requirement everywhere except x86 / x86_64 (since the controversy was
only about those architectures); the special caveats and settings can
easily be removed later when we're ready to increase the requirements
on x86 / x86_64 (and if someone would like to raise the issue on LWN
as suggested in the previous discussion, that would be welcome).  3.2
kernel headers are required everywhere by this patch.

(x32 already requires 3.4 or later, so is unaffected by this patch.)

As usual for such a change, this patch only changes the configure
scripts and associated documentation.  The intent is to follow up with
removal of dead __LINUX_KERNEL_VERSION conditionals.  Each __ASSUME_*
or other macro that becomes dead can then be removed independently.

Tested for x86_64 and x86.

* sysdeps/unix/sysv/linux/configure.ac (LIBC_LINUX_VERSION):
Define to 3.2.0.
(arch_minimum_kernel): Likewise.
* sysdeps/unix/sysv/linux/configure: Regenerated.
* sysdeps/unix/sysv/linux/i386/configure.ac (arch_minimum_kernel):
Define to 2.6.32.
* sysdeps/unix/sysv/linux/i386/configure: Regenerated.
* sysdeps/unix/sysv/linux/x86_64/64/configure.ac
(arch_minimum_kernel): Define to 2.6.32.
* sysdeps/unix/sysv/linux/x86_64/64/configure: Regenerated.
* README: Document Linux 3.2 requirement.
* manual/install.texi (Linux): Document Linux 3.2 headers
requirement.
* INSTALL: Regenerated.

8 years agoDon't use long double math functions if NO_LONG_DOUBLE
Andreas Schwab [Tue, 23 Feb 2016 15:27:56 +0000 (16:27 +0100)]
Don't use long double math functions if NO_LONG_DOUBLE

8 years agoAdd fts64_* to sysdeps/arm/nacl/libc.abilist
Roland McGrath [Mon, 22 Feb 2016 23:19:56 +0000 (15:19 -0800)]
Add fts64_* to sysdeps/arm/nacl/libc.abilist

8 years agointl: reintroduce unintentionally disabled optimization
Dmitry V. Levin [Sat, 23 Jan 2016 23:48:10 +0000 (23:48 +0000)]
intl: reintroduce unintentionally disabled optimization

HAVE_BUILTIN_EXPECT macro was removed by commit glibc-2.14-280-g3ce1f29,
but then its use was unintentionally reintroduced during merge with GNU
gettext 0.19.3 by commit glibc-2.20-324-g6d24885, effectively disabling
all optimization based on __builtin_expect.  As intl files are also part
of GNU gettext, HAVE_BUILTIN_EXPECT macro cannot be removed, so define
it unconditionally in config.h.in instead.

[BZ #19512]
* config.h.in (HAVE_BUILTIN_EXPECT): New macro.

8 years agoAdd missing inclusion of libc-internal.h.
Stefan Liebler [Mon, 22 Feb 2016 16:44:41 +0000 (17:44 +0100)]
Add missing inclusion of libc-internal.h.

The build of posix/tst-dir.c fails due to undefined DIAG_* macros.
The usage of the macros were introduced in recent commit
7584a3f96de88d5eefe5d6c634515278cbfbf052
"Deprecate readdir_r, readdir64_r [BZ #19056]".
This patch adds the missing header libc-internal.h.

8 years agoDeprecate readdir_r, readdir64_r [BZ #19056]
Florian Weimer [Sat, 20 Feb 2016 11:56:55 +0000 (12:56 +0100)]
Deprecate readdir_r, readdir64_r [BZ #19056]

8 years ago[x86_64] Set DL_RUNTIME_UNALIGNED_VEC_SIZE to 8
H.J. Lu [Fri, 19 Feb 2016 23:43:45 +0000 (15:43 -0800)]
[x86_64] Set DL_RUNTIME_UNALIGNED_VEC_SIZE to 8

Due to GCC bug:

   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066

__tls_get_addr may be called with 8-byte stack alignment.  Although
this bug has been fixed in GCC 4.9.4, 5.3 and 6, we can't assume
that stack will be always aligned at 16 bytes.  Since SSE optimized
memory/string functions with aligned SSE register load and store are
used in the dynamic linker, we must set DL_RUNTIME_UNALIGNED_VEC_SIZE
to 8 so that _dl_runtime_resolve_sse will align the stack before
calling _dl_fixup:

Dump of assembler code for function _dl_runtime_resolve_sse:
   0x00007ffff7deea90 <+0>: push   %rbx
   0x00007ffff7deea91 <+1>: mov    %rsp,%rbx
   0x00007ffff7deea94 <+4>: and    $0xfffffffffffffff0,%rsp
                                ^^^^^^^^^^^ Align stack to 16 bytes
   0x00007ffff7deea98 <+8>: sub    $0x100,%rsp
   0x00007ffff7deea9f <+15>: mov    %rax,0xc0(%rsp)
   0x00007ffff7deeaa7 <+23>: mov    %rcx,0xc8(%rsp)
   0x00007ffff7deeaaf <+31>: mov    %rdx,0xd0(%rsp)
   0x00007ffff7deeab7 <+39>: mov    %rsi,0xd8(%rsp)
   0x00007ffff7deeabf <+47>: mov    %rdi,0xe0(%rsp)
   0x00007ffff7deeac7 <+55>: mov    %r8,0xe8(%rsp)
   0x00007ffff7deeacf <+63>: mov    %r9,0xf0(%rsp)
   0x00007ffff7deead7 <+71>: movaps %xmm0,(%rsp)
   0x00007ffff7deeadb <+75>: movaps %xmm1,0x10(%rsp)
   0x00007ffff7deeae0 <+80>: movaps %xmm2,0x20(%rsp)
   0x00007ffff7deeae5 <+85>: movaps %xmm3,0x30(%rsp)
   0x00007ffff7deeaea <+90>: movaps %xmm4,0x40(%rsp)
   0x00007ffff7deeaef <+95>: movaps %xmm5,0x50(%rsp)
   0x00007ffff7deeaf4 <+100>: movaps %xmm6,0x60(%rsp)
   0x00007ffff7deeaf9 <+105>: movaps %xmm7,0x70(%rsp)

[BZ #19679]
* sysdeps/x86_64/dl-trampoline.S (DL_RUNIME_UNALIGNED_VEC_SIZE):
Renamed to ...
(DL_RUNTIME_UNALIGNED_VEC_SIZE): This.  Set to 8.
(DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ...
(DL_RUNTIME_RESOLVE_REALIGN_STACK): This.  Updated.
(DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ...
(DL_RUNTIME_RESOLVE_REALIGN_STACK): This.
* sysdeps/x86_64/dl-trampoline.h
(DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ...
(DL_RUNTIME_RESOLVE_REALIGN_STACK): This.

8 years agoelf.h: Add NT_ARM_SYSTEM_CALL constant.
Mark Wielaard [Fri, 12 Feb 2016 16:54:38 +0000 (17:54 +0100)]
elf.h: Add NT_ARM_SYSTEM_CALL constant.

Linux kernel 3.18 added the NT_ARM_SYSTEM_CALL regset for aarch64.

* elf/elf.h: Add NT_ARM_SYSTEM_CALL.

8 years agoelf/elf.h: Add new 386 and X86_64 relocations from binutils.
Mark Wielaard [Fri, 29 Jan 2016 08:49:01 +0000 (09:49 +0100)]
elf/elf.h: Add new 386 and X86_64 relocations from binutils.

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.

8 years agotest-skeleton: increase default TIMEOUT to 20 seconds
Mike Frysinger [Tue, 19 Jan 2016 14:18:00 +0000 (09:18 -0500)]
test-skeleton: increase default TIMEOUT to 20 seconds

The vast majority of timeouts I've seen w/glibc tests are due to:
 - slow system (e.g. <1 GHz cpu)
 - loaded system (e.g. lots of parallelism)
Even then, I've seen timeouts on system I don't generally consider
slow, or even loaded, and considering TIMEOUT is set to <=10 in ~60
tests (and <=20 in ~75 tests), it seems I'm not alone.  I've just
gotten in the habit of doing `export TIMEOUTFACTOR=10` on all my
setups.

In the edge case where there is a bug in the test and the timeout is
hit, I think we all agree that's either a problem with the test or a
real bug in the library somewhere.  In either case, the incident rate
should be low, so catering to that seems like the wrong trade-off.

Other developers too usually set large timeout factors.  Increase the
default to 20 seconds to match reality.

8 years agolocales: pap_AN: delete old/deprecated locale [BZ #16003]
Mike Frysinger [Fri, 19 Feb 2016 06:49:29 +0000 (01:49 -0500)]
locales: pap_AN: delete old/deprecated locale [BZ #16003]

From the bug:
Netherlands Antilles was dissolved, and "AN" is not a part of ISO 3166
anymore.  According to setlocale(3), "territory is an ISO 3166 country
code".  We now have pap_AW and pap_CW.

Reported-by: Chris Leonard <cjlhomeaddress@gmail.com>
8 years agolocaledata: CLDRv28: update LC_TELEPHONE.int_prefix
Mike Frysinger [Tue, 9 Feb 2016 05:06:52 +0000 (00:06 -0500)]
localedata: CLDRv28: update LC_TELEPHONE.int_prefix

This updates a bunch of locales based on CLDR v28 data:
  ar_SS: int_prefix: changing 249 to 211
  bn_BD: int_prefix: changing 88 to 880
  dz_BT: int_prefix: changing 66 to 975
  en_HK: int_prefix: changing  to 852
  en_PH: int_prefix: changing  to 63
  en_SG: int_prefix: changing  to 65
  es_DO: int_prefix: changing 1809 to 1
  es_PA: int_prefix: changing 502 to 507
  es_PR: int_prefix: changing 1787 to 1
  km_KH: int_prefix: changing 856 to 855
  mt_MT: int_prefix: changing  to 356
  ne_NP: int_prefix: changing 91 to 977
  pap_AW: int_prefix: changing 599 to 297
  the_NP: int_prefix: changing 91 to 977
  tk_TM: int_prefix: changing  to 993
  uz_UZ: int_prefix: changing 27 to 998
  zh_SG: int_prefix: changing  to 65

I've also checked these against https://countrycode.org/.

Note: the Dominican Republic (DO) and Puerto Rico (PR) updates are
correct: they both use +1.  Historically, DO had one area code of
809 and PR of 787 which is why they were listed as such, but they
have both expanded into 829 and 989 respectively, so using the four
digit value is def incorrect now.

8 years agonptl: support thread stacks that grow up
Carlos O'Donell [Sun, 9 Aug 2015 08:17:17 +0000 (04:17 -0400)]
nptl: support thread stacks that grow up

Gentoo has been carrying this for all arches since 2.17.

URL: http://bugs.gentoo.org/301642

8 years agoUpdate NEWS with 2.24 template
Adhemerval Zanella [Fri, 19 Feb 2016 17:29:53 +0000 (15:29 -0200)]
Update NEWS with 2.24 template

8 years agoFix ldbl-128ibm nextafterl, nexttowardl sign of zero result (bug 19678).
Joseph Myers [Fri, 19 Feb 2016 17:19:53 +0000 (17:19 +0000)]
Fix ldbl-128ibm nextafterl, nexttowardl sign of zero result (bug 19678).

The ldbl-128ibm implementation of nextafterl / nexttowardl returns -0
in FE_DOWNWARD mode when taking the next value below the least
positive subnormal, when it should return +0.  This patch fixes it to
check explicitly for this case.

Tested for powerpc.

[BZ #19678]
* sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl):
Ensure +0.0 is returned when taking the next value below the least
positive value.

8 years agomalloc: Remove NO_THREADS
Florian Weimer [Fri, 19 Feb 2016 16:07:45 +0000 (17:07 +0100)]
malloc: Remove NO_THREADS

No functional change.  It was not possible to build without
threading support before.

8 years agomalloc: Remove max_total_mem member form struct malloc_par
Florian Weimer [Fri, 19 Feb 2016 16:07:04 +0000 (17:07 +0100)]
malloc: Remove max_total_mem member form struct malloc_par

Also note that sumblks in struct mallinfo is always 0.
No functional change.

8 years agomalloc: Remove arena_mem variable
Florian Weimer [Fri, 19 Feb 2016 16:06:33 +0000 (17:06 +0100)]
malloc: Remove arena_mem variable

The computed value is never used.  The accesses were data races.

8 years agores_ninit: Update comment
Florian Weimer [Fri, 19 Feb 2016 16:00:47 +0000 (17:00 +0100)]
res_ninit: Update comment

Since commit e66e7419a6f58200eec6941b14e2dcff9875cc6c (Actually make
it possible to user the default name server.), the default is
INADDR_LOOPBACK, not INADDR_ANY.

8 years agoImprove file descriptor checks for posix_spawn actions [BZ #19505]
Florian Weimer [Fri, 19 Feb 2016 13:49:38 +0000 (14:49 +0100)]
Improve file descriptor checks for posix_spawn actions [BZ #19505]

This page took 1.291894 seconds and 5 git commands to generate.