Commit Graph

29057 Commits

Author SHA1 Message Date
Roland McGrath
7493ab257e Add abilist files and NEWS item for arm-nacl port. 2015-07-21 13:31:21 -07:00
Chris Metcalf
0ac4f1dab3 tile: Fix BZ #18508 (makecontext yield infinite backtrace)
It turns out tile suffered from the same problem as S390.  However,
disabling CFI information for the __startcontext on tile was not
sufficient to fix the problem; I think the backtracer will just
blindly try to follow the link register (lr) in that case.

Instead, the change adds a cfi_undefined directive for "lr"
and then arranges to call __startcontext directly when the new
context starts, rather than just synthesizing a return to it.
In addition to being a bit easier now to understand the control
flow, this also allows the cfi_undefined directive to be placed in
a way that causes it to be in force at the address that the "lr"
from the called function points to.
2015-07-21 12:11:55 -04:00
Marko Myllynen
f30d94a74a locale: Remove obsolete repertoire map references
repertoire maps and character mnemonics were used early in the glibc
i18n/l10n effort but were quickly deprecated in favor of Unicode code
points. According to ChangeLog, the in-tree repertoire maps were
removed 2000-07-07 but some stray references remain even today. The
patch below removes them.
2015-07-21 03:54:02 -04:00
Khem Raj
8bb524be8f locale: Do not define lang_ab for tcy_IN and bhb_IN
After renaming localedef now complains and build fails

LC_ADDRESS: field `lang_ab' must not be defined

earlier the names were similar to lang_ab definitions 'tu' or 'bh'
but after rename they are not.
2015-07-21 02:52:00 -04:00
Khem Raj
536fb97780 Reflect renaming of bh_IN and tu_IN in SUPPORTED file [BZ #17475] 2015-07-20 22:09:07 -04:00
Mike Frysinger
7fde904c73 sparc: fix sigaction for 32bit builds [BZ #18694]
Commit a059d359d8 changed the sigaction
struct to pass conform tests, but it ended up also changing the ABI for
32 bit builds.  For 64 bit builds, changing the long to two ints works,
but for 32 bit builds, it inserts 4 extra bytes.  This leads to many
packages randomly failing like bash that spews things like:
	configure: line 471: wait_for: No record of process 0

Bracket the new member by a wordsize check to fix the ABI for 32bit.
2015-07-20 21:53:47 -04:00
Siddhesh Poyarekar
d72c276305 Remove Linuxism from tst-tls-atexit
The tst-tls-atexit test case searches for its module in /proc/PID/maps
to verify that it is unloaded, which is a Linux-specific test.  This
patch makes the test generic by looking for the library in the link
map list in the _r_debug structure.

Verified that the test continues to succeed on x86_64.  There is a bug
in the test case where it calls dlclose once again, which is actually
incorrect but still manages to unload the DSO thanks to an existing
bug in __tls_call_dtors.  This will be fixed in a later patch which
also fixes up the __cxa_thread_atexit_impl implementation.  I have
added a FIXME comment to that call momentarily, which I will remove
when I fix the problem.

	* stdlib/tst-tls-atexit-lib.c (do_foo): Rename to reg_dtor.
	* stdlib/tst-tls-atexit.c: (is_loaded): New function.
	(spawn_thread): New function.
	(load): Rename to reg_dtor_and_close.  Move dlopen to...
	(do_test): ... here.  Use IS_LOADED to test for its
	availability.
2015-07-21 07:14:17 +05:30
Andreas Schwab
530deb962f m68k: update libm test ULPs 2015-07-21 00:20:24 +02:00
Chris Metcalf
d714acac7d tst-leaks: raise timeout to 5 seconds
This test takes about 2.3 seconds on my tilegx system, and so
times out.  Bump it up to 5 seconds instead.
2015-07-20 17:32:34 -04:00
H.J. Lu
d4358b51c2 Add si_addr_bnd to _sigfault in x86 struct siginfo
X86 struct siginfo in kernel 3.19 has been changed by

commit ee1b58d36aa1b5a79eaba11f5c3633c88231da83
Author: Qiaowei Ren <qiaowei.ren@intel.com>
Date:   Fri Nov 14 07:18:19 2014 -0800

    mpx: Extend siginfo structure to include bound violation information

    This patch adds new fields about bound violation into siginfo
    structure. si_lower and si_upper are respectively lower bound
    and upper bound when bound violation is caused.

This patch updates x86 struct siginfo to enable GDB with MPX support.

	[BZ #18696]
	* sysdeps/unix/sysv/linux/x86/bits/siginfo.h (_sigfault): Add
	si_addr_bnd.
	(si_lower): New.
	(si_upper): Likewise.
2015-07-20 11:54:53 -07:00
David S. Miller
d87630edc4 Regenerate SPARC ULPs.
* sysdeps/sparc/fpu/libm-test-ulps: Regenerated.
2015-07-16 12:03:33 -07:00
Adhemerval Zanella
787813b144 libio: Fix fmemopen 'w' mode with provided buffer
If 'w' mode is used with a provided buffer the fmemopen will try to find
the first null byte to set as maximum internal stream size.  It should be
done only for append mode ('a').

Kudos for Stefan Liebler for finding this error on s390-32.

	* libio/fmemopen.c (__fmemopen): Fix 'w' openmode with provided
	buffer.
	* stdio-common/tst-fmemopen2.c (do_test_with_buffer): Fix typo and
	fail output information.
2015-07-16 15:21:49 -03:00
Rajalakshmi Srinivasaraghavan
b42f8cad52 powerpc: strstr optimization
This patch optimizes strstr function for power >= 7 systems.  Performance
gain is obtained using aligned memory access and usage of cmpb
instruction for quicker comparison.  The average improvement of this
optimization is ~40%.  Tested on ppc64 and ppc64le.

2015-07-16  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>

	* sysdeps/powerpc/powerpc64/multiarch/Makefile: Add strstr().
	* sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c: Likewise.
	* sysdeps/powerpc/powerpc64/power7/strstr.S: New File.
	* sysdeps/powerpc/powerpc64/multiarch/strstr-power7.S: New File.
	* sysdeps/powerpc/powerpc64/multiarch/strstr-ppc64.c: New File.
	* sysdeps/powerpc/powerpc64/multiarch/strstr.c: New File.
2015-07-16 13:43:51 -03:00
Mike Frysinger
6b96d6de8c hppa/ia64: _dl_unmap: make it hidden
This symbol is only used by DL_UNMAP which in turn is only used by
_dl_close_worker in dl-close.c, and _dl_close_worker itself is marked
hidden as it is only used by the ldso.  That means _dl_unmap should
be marked hidden.  Without this, the elf/check-localplt test fails.
2015-07-16 09:03:46 -04:00
Mike Frysinger
2a6ad8142d hppa/ia64: _dl_symbol_address: add PLT bypass for rtld
This symbol is defined in the ldso, and is used both there and libc.so.
There is no hidden symbol for it though which leads to relocations in
the ldso and the elf/check-localplt test failing.  Add a hidden def for
rtld to fix all of that.

This function/file is only used by hppa & ia64, so no testing is needed
for other arches.
2015-07-16 09:03:08 -04:00
Siddhesh Poyarekar
e591758b38 Add comment to clarify how the test can fail 2015-07-16 10:38:29 +05:30
Siddhesh Poyarekar
9ceb5f6251 Whitespace fixup in cxa_thread_atexit_impl.c 2015-07-16 08:54:40 +05:30
Siddhesh Poyarekar
b632bdd3f7 Set NODELETE flag when opening already open objects with RTLD_NODELETE
The DF_1_NODELETE flag is set too late when opening a DSO, due to
which, if a DSO is already open, subsequently opening it with
RTLD_NODELETE fails to set the DF_1_NODELETE flag.  This patch fixes
this by setting the flag immediately after bumping the opencount.

Verified on x86_64.

	[BZ #18676]
	* elf/tst-nodelete-opened.c: New test case.
	* elf/tst-nodelete-opened-lib.c: New test case module.
	* elf/Makefile (tests, modules-names): Use them.
	* elf/dl-open.c (dl_open_worker): Set DF_1_NODELETE flag
	early.
2015-07-16 08:53:28 +05:30
David S. Miller
c59f721c73 Fix sparc build.
* sysdeps/sparc/nptl/pthread_barrier_init.c: Include
	futex-intenal.h
	* sysdeps/sparc/sparc32/sparcv9/Makefile (nscd): Add cpu_relax.
	* sysdeps/sparc/sparc64/Makefile: Likewise.
	* sysdeps/sparc/sparc32/sparcv9/bits/atomic.h (atomic_spin_nop):
	Remove space from macro define.
	* sysdeps/sparc/sparc64/bits/atomic.h (atomic_spin_nop): Likewise.
2015-07-15 16:07:32 -07:00
H.J. Lu
c9328a5c4c Sort NEWS 2015-07-15 05:38:01 -07:00
Pravin Satpute
032c510db0 Correcting language code for Bhili and Tulu locales (bug 17475)
Bhili [1] and Tulu [2] language does not have iso-639-1 codes. Patch
moves locale file with correct code and also fix iso-639.def.

1. http://www-01.sil.org/iso639-3/documentation.asp?id=bhb
2. http://www-01.sil.org/iso639-3/documentation.asp?id=tcy

localedata/ChangeLog:

2015-07-02  Pravin Satpute  <psatpute@redhat.com>

	[BZ #17475]
        * locales/tu_IN: renamed to tcy_IN
	* locales/bh_IN: renamed to bhb_IN

Changelog:

2015-03-05  Pravin Satpute  <psatpute@redhat.com>

	[BZ #17475]
	* locale/iso-639.def: Update Bhili and Tulu language codes as
	per iso639-3.
2015-07-15 16:06:18 +05:30
Arjun Shankar
0035851c3c Modify several tests to use test-skeleton.c
These tests were skipped by the use-test-skeleton conversion done in
commit 29955b5d because they were reused in other tests via the #include
directive, and so deemed worth an inspection before they were modified.
This has now been done.

ChangeLog:

2015-07-09  Arjun Shankar  <arjun.is@lostca.se>

	* elf/tst-leaks1.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* localedata/tst-langinfo.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* math/test-fpucw.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* math/test-tgmath.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* math/test-tgmath2.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* setjmp/tst-setjmp.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* stdio-common/tst-sscanf.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
	* sysdeps/x86_64/tst-audit6.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
2015-07-15 15:10:23 +05:30
Arjun Shankar
e505234f6e Modify elf/tst-audit9.c to use test-skeleton.c
This test was skipped by the use-test-skeleton conversion script
[29955b5d] because the definition of `main' did not begin according to
the GNU formatting style that the script assumed.

ChangeLog:

2015-07-09  Arjun Shankar  <arjun.is@lostca.se>

	* elf/tst-audit9.c (main): Converted to ...
	(do_test): ... this.
	(TEST_FUNCTION): New macro.
	Include test-skeleton.c.
2015-07-15 15:10:23 +05:30
Mike Frysinger
112f28e88c tst-tzset: raise timeout to 5 seconds
This test is reliably taking 2.3 seconds on my system, and the default
is 2 seconds, so it always times out.  Bump it up to 5 seconds instead.
2015-07-15 03:46:03 -04:00
Stefan Liebler
f6267fd880 i686: Mark stdlib/tst-makecontext as XFAIL.
The testcase stdlib/tst-makecontext fails on i686 because
_Unwind_Backtrace from libgcc produces a segmentation fault if it was
called within a context created by makecontext. See Bug 18635.

ChangeLog:

	* sysdeps/i386/i686/Makefile (test-xfail-tst-makecontext):
	New variable.
2015-07-15 09:33:15 +02:00
Stefan Liebler
ed95ec72fb S390: Regenerate ULPs
I've regenerated the ulps for s390 from scratch.

ChangeLog:

	* sysdeps/s390/fpu/libm-test-ulps: Regenerated.
2015-07-15 09:33:14 +02:00
Roland McGrath
c01ae97eb8 Factor file identity rules out of generic rtld code. 2015-07-14 13:15:26 -07:00
Siddhesh Poyarekar
38b759496b Fix up typo in tst-tls-atexit 2015-07-14 20:27:09 +05:30
Adhemerval Zanella
edcfe9eab0 Avoid C++ tests when the C++ cannot be linked
* elf/Makefile [ifeq (yes,$(build-shared)) (tests)] (tst-nodelete):
	Add iff $CXX is set.
	[ifeq (yes,$(build-shared)) (modules-names)] (tst-nodelete-rtldmod):
	Likewise.
	(tst-nodelete-zmodiff): Likewise.
	* nptl/Makefile [[ifeq (,$(CXX))] (tests-unsupported)]: Add tst-once5.
2015-07-14 11:19:47 -03:00
Siddhesh Poyarekar
45baea1e79 Fix up ChangeLog 2015-07-14 19:45:16 +05:30
Siddhesh Poyarekar
8e7e971a91 Whitespace fix in tst-tls-atexit.c 2015-07-14 19:44:55 +05:30
Wilco Dijkstra
82641e16aa Add AArch64 versions of math_opt_barrier and math_force_eval that avoid going via memory. 2015-07-13 12:48:33 +01:00
Wilco Dijkstra
c435989f52 Optimize the strlen implementation by using a page cross check and a fast check
for nul bytes which reverts to separate loop when a non-ASCII char is encountered.
Speedup on test-strlen is ~10%, long ASCII strings are processed ~60% faster,
and on random tests it is ~80% better.
2015-07-13 12:38:12 +01:00
H.J. Lu
70249b57e1 Replace %ld with %jd and cast to intmax_t
On x32, GCC 5.1 complains:

tst-fmemopen2.c: In function ‘do_test_without_buffer’:
tst-fmemopen2.c:124:15: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘off_t {aka long long int}’ [-Werror=format=]
       printf ("FAIL: first ftello returned %ld, expected %zu\n", o, nstr);
               ^
tst-fmemopen2.c:135:15: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘off_t {aka long long int}’ [-Werror=format=]
       printf ("FAIL: second ftello returned %ld, expected %zu\n", o, nbuf);
               ^
tst-fmemopen2.c:148:15: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘off_t {aka long long int}’ [-Werror=format=]
       printf ("FAIL: third ftello returned %ld, expected %zu\n", o, nstr2);
               ^
tst-fmemopen2.c: In function ‘do_test_length_zero’:
tst-fmemopen2.c:183:15: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘off_t {aka long long int}’ [-Werror=format=]
       printf ("FAIL: first ftello returned %ld, expected 0\n", o);
               ^

This patch silences GCC.

	* stdio-common/tst-fmemopen2.c (do_test_without_buffer): Replace
	%ld with %jd and cast to intmax_t.
	(do_test_length_zero): Likewise.
2015-07-11 13:45:33 -07:00
Roland McGrath
398a80fec8 NaCl: Make pthread_condattr_setclock reject CLOCK_MONOTONIC. 2015-07-10 14:18:14 -07:00
Chris Metcalf
ef115d3ade tile: Regenerate ULPs.
Regenerated from scratch on tilegx.
2015-07-10 16:16:37 -04:00
Chris Metcalf
75413d4928 math/test-fenvinline: avoid compiler warning
On tile (and any other machine with no FP exceptions) the
feenable_test() function will generate a "function defined but
not used" warning because all of the callers are commented out.
We already were ifdef'ing out the body of the function, so instead
just ifdef out the entire function if FE_ALL_EXCEPT == 0.
2015-07-10 16:11:40 -04:00
Siddhesh Poyarekar
0c8f39cbf7 Remove unnecessary mutex locks from tst-tls-atexit test case
The locks don't synchronize with anything - they were likely
introduced initially to synchronize with some main thread code, but
that is no longer evident.
2015-07-10 23:23:57 +05:30
Siddhesh Poyarekar
962a1aeb28 Avoid boolean coercion in tst-tls-atexit test case 2015-07-10 23:21:32 +05:30
Torvald Riegel
1aa8d144f9 Clean up semaphore EINTR handling after Linux futex docs clarification.
The Linux kernel futex documentation now states that since Linux 2.6.22,
FUTEX_WAIT does return EINTR only when interrupted by a signal, and not
spuriously anymore.  We only support more recent kernels, so clean up
EINTR handling in the semaphore and update the comments.
2015-07-10 13:47:45 +02:00
Torvald Riegel
a2f0363f81 Add and use new glibc-internal futex API.
This adds new functions for futex operations, starting with wait,
abstimed_wait, reltimed_wait, wake.  They add documentation and error
checking according to the current draft of the Linux kernel futex manpage.

Waiting with absolute or relative timeouts is split into separate functions.
This allows for removing a few cases of code duplication in pthreads code,
which uses absolute timeouts; also, it allows us to put platform-specific
code to go from an absolute to a relative timeout into the platform-specific
futex abstractions..

Futex operations that can be canceled are also split out into separate
functions suffixed by "_cancelable".

There are separate versions for both Linux and NaCl; while they currently
differ only slightly, my expectation is that the separate versions of
lowlevellock-futex.h will eventually be merged into futex-internal.h
when we get to move the lll_ functions over to the new futex API.
2015-07-10 13:47:09 +02:00
Martin Sebor
203c1a898d The patch committed to fix bug #18435 caused regressions on aarch64
and also powerpc64 and powerpc64le. See the discussion in the thread
below for details. This change reverts the problematic bits leaving
the added test in place and marking XFAIL in anticipation of fixing
the bug in the near future.
https://sourceware.org/ml/libc-alpha/2015-07/msg00141.html

	[BZ #18435]
	* nptl/pthreadP.h (pthread_cleanup_push, pthread_cleanup_pop):
	Revert commit ed225df3ad.
	* nptl/Makefile (test-xfail-tst-once5): Define.
2015-07-09 19:27:06 -04:00
Roland McGrath
2193ce8746 Provide __libc_fatal for rtld. 2015-07-09 15:32:32 -07:00
Roland McGrath
af85d409a2 PLT avoidance for _exit in rtld. 2015-07-09 15:25:47 -07:00
H.J. Lu
2eb9ef29b6 Improve bndmov encoding with zero displacement
If x86-64 assembler doesn't support MPX, we encode bndmov instruction by
hand.  When displacement is zero, assembler generates shorter encoding.
This patch improves bndmov encoding with zero displacement so that ld.so
is identical when using assemblers with and without MPX support.

	* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_resolve): Improve
	bndmov encoding with zero displacement.
2015-07-09 09:30:20 -07:00
Igor Zamyatin
14c5cbabc2 Preserve bound registers for pointer pass/return
We need to save/restore bound registers and add a BND prefix before
branches in _dl_runtime_profile so that bound registers for pointer
pass and return are preserved when LD_AUDIT is used.

	[BZ #18134]
	* sysdeps/i386/configure.ac: Set HAVE_MPX_SUPPORT.
	* sysdeps/i386/configure: Regenerated.
	* sysdeps/i386/dl-trampoline.S (PRESERVE_BND_REGS_PREFIX): New.
	(_dl_runtime_profile): Save and restore Intel MPX return bound
	registers when calling _dl_call_pltexit.  Add
	PRESERVE_BND_REGS_PREFIX before return.
	* sysdeps/i386/link-defines.sym (LRV_BND0_OFFSET): New.
	(LRV_BND1_OFFSET): Likewise.
	* sysdeps/x86/bits/link.h (La_i86_retval): Add lrv_bnd0 and
	lrv_bnd1.
	* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix
	typo in bndmov encoding.
	* sysdeps/x86_64/dl-trampoline.h: Properly save and restore
	Intel MPX bound registers.  Add PRESERVE_BND_REGS_PREFIX before
	branch instructions to preserve bounds.
2015-07-09 06:50:12 -07:00
Adhemerval Zanella
632b3db8e2 libio: Update powerpc64le libc.abilist
This patch adds the missing fmemopen entry for powerpc64le libc abilist
check file.

	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
2015-07-09 10:28:58 -03:00
Samuel Thibault
ed4060f50e hurd: permit to use mlock from non-root process
* sysdeps/mach/hurd/mlock.c (mlock): When __get_privileged_ports
returns an error, also try to use host port from __mach_host_self for
the __vm_wire call.
* sysdeps/mach/hurd/munlock.c (munlock): Likewise.
2015-07-09 13:56:30 +02:00
Szabolcs Nagy
b8528e771c [AArch64][BZ 18648] change greg_t definition in ucontext.h
This is an ABI breaking change, but

	typedef int greg_t;

is not a useful definition on aarch64.

greg_t is usually used for defining gregset_t which is used
in mcontext_t.  The general registers in mcontext_t can only
be accessed by target specific code and on aarch64 greg_t
is not needed for that so this change is not supposed to break
existing code, just fix the definition.

	[BZ #18648]
	* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h (greg_t): Change the
	definition to elf_greg_t.

(Added another BZ entry that was missed in the previous commit).
2015-07-09 09:53:30 +01:00
Szabolcs Nagy
14d623bcd1 [AArch64][BZ 18400] fix elf_prpsinfo in procfs.h
Kernel uses int pr_uid, pr_gid, but glibc used unsigned short.

This is an ABI breaking change, but the size and alignment of
the struct and the layout of other members is not changed and
there is no known usage of pr_uid and pr_gid so it is expected
to be safe.

	[BZ #18400]
	* sysdeps/unix/sysv/linux/aarch64/sys/procfs.h (struct elf_prpsinfo):
	Fix pr_uid and pr_gid members.
2015-07-09 09:39:51 +01:00