about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* aarch64: Re-implement setcontext without rt_sigreturn syscallWill Newton2014-04-173-60/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of setcontext uses rt_sigreturn to restore the contents of registers. This contrasts with the way most other architectures implement setcontext: powerpc64, mips, tile: Call rt_sigreturn if context was created by a call to a signal handler, otherwise restore in user code. powerpc32: Call swapcontext system call and don't call sigreturn or rt_sigreturn. x86_64, sparc, hppa, sh, ia64, m68k, s390, arm: Only support restoring "synchronous" contexts, that is contexts created by getcontext, and restoring in user code and don't call sigreturn or rt_sigreturn. alpha: Call sigreturn (but not rt_sigreturn) in all cases to do the restore. The text of the setcontext manpage suggests that the requirement to be able to restore a signal handler created context has been dropped from SUSv2: If the context was obtained by a call to a signal handler, then old standard text says that "program execution continues with the program instruction following the instruction interrupted by the signal". However, this sentence was removed in SUSv2, and the present verdict is "the result is unspecified". Implementing setcontext by calling rt_sigreturn unconditionally causes problems when used with sigaltstack as in BZ #16629. On this basis it seems that aarch64 is broken and that new ports should only support restoring contexts created with getcontext and do not need to call rt_sigreturn at all. This patch re-implements the aarch64 setcontext function to restore the context in user code in a similar manner to x86_64 and other ports. ChangeLog: 2014-04-17 Will Newton <will.newton@linaro.org> [BZ #16629] * sysdeps/unix/sysv/linux/aarch64/setcontext.S (__setcontext): Re-implement to restore registers in user code and avoid rt_sigreturn system call.
* Add fenv test support for targets which don't have FP traps.Wilco2014-04-174-10/+36
|
* [AArch64] Define HAVE_RM_CTX and related hooks.Ian Bolton2014-04-172-0/+67
|
* [AArch64] Provide initial implementation of math_private.h.Ian Bolton2014-04-172-0/+219
|
* alpha: Remove alpha-linux pthread_once.cRichard Henderson2014-04-162-95/+2
|
* alpha: Enable unwind tables for backtrace.cRichard Henderson2014-04-162-0/+8
|
* alpha: Fix __pointer_chk_guard definition for the testsuiteRichard Henderson2014-04-162-1/+4
|
* alpha: Regenerate sysdeps/alpha/libm-test-ulpsRichard Henderson2014-04-162-4/+1026
|
* [AArch64] Regenerate libm-test-ulps.Marcus Shawcroft2014-04-162-87/+1019
|
* Save/restore bound registers for _dl_runtime_profileIgor Zamyatin2014-04-165-0/+77
| | | | | | | | | | | | | | | | | This patch saves and restores bound registers in x86-64 PLT for ld.so profile and LD_AUDIT: * sysdeps/x86_64/bits/link.h (La_x86_64_regs): Add lr_bnd. (La_x86_64_retval): Add lrv_bnd0 and lrv_bnd1. * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Save Intel MPX bound registers before _dl_profile_fixup. * sysdeps/x86_64/dl-trampoline.h: Restore Intel MPX bound registers after _dl_profile_fixup. Save and restore bound registers bnd0/bnd1 when calling _dl_call_pltexit. * sysdeps/x86_64/link-defines.sym (BND_SIZE): New. (LR_BND_OFFSET): Likewise. (LRV_BND0_OFFSET): Likewise. (LRV_BND1_OFFSET): Likewise.
* hurd: Add i386 fields to TLS structureSamuel Thibault2014-04-162-0/+13
| | | | | | * sysdeps/mach/hurd/i386/tls.h (tcbhead_t): Add multiple_threads, sysinfo, stack_guard, pointer_guard, gscope_flag, private_futex, __private_tm, __private_ss fields.
* hurd: Move dtv, dtv_t, tcbhead_t declaration to per-arch file.Samuel Thibault2014-04-163-21/+30
|
* hurd: Do not allow unmapping address 0Samuel Thibault2014-04-162-0/+11
| | | | * sysdeps/mach/munmap.c (__munmap): Return EINVAL if `addr' is 0.
* S/390: Regenerate ULPsStefan Liebler2014-04-162-0/+1020
|
* [BZ #14770] S/390: Require Binutils >= 2.24 for target S/390.Stefan Liebler2014-04-164-6/+89
|
* [BZ #16824] Fix failing y1 due to too large ulps in downward/upward rounding ↵Stefan Liebler2014-04-163-1/+8
| | | | mode.
* Update fixed bug listAlan Modra2014-04-162-4/+5
|
* Correct IBM long double frexpl.Alan Modra2014-04-163-44/+118
| | | | | | | | | | | Besides fixing the bugzilla, this also fixes corner-cases where the high and low double differ greatly in magnitude, and handles a denormal input without resorting to a fp rescale. [BZ #16740] [BZ #16619] * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c (__frexpl): Rewrite. * math/libm-test.inc (frexp_test_data): Add tests.
* benchtests: Link against objects in build directorySiddhesh Poyarekar2014-04-152-23/+16
| | | | | | | | | | Using -lm and -lpthread results in the shared objects in the system being used to link against. This happened to work for libm because there haven't been any changes to the libm ABI recently that could break the existing benchmarks. This doesn't always work for the pthread benchmarks. The correct way to build against libraries in the build directory is to have the binaries explicitly depend on them so that $(+link) can pick them up.
* Support _r_debug for static binaries.Carlos O'Donell2014-04-143-1/+10
| | | | | | | | | | | | | | | | We initialize _r_debug for static binaries to allows debug agents to treat static binaries a little more like dyanmic ones. This simplifies the work a debug agent has to do to access TLS in a static binary via libthread_db. Tested on x86_64. See: https://sourceware.org/ml/libc-alpha/2014-04/msg00183.html [BZ #16831] * csu/libc-start.c (LIBC_START_MAIN) [!SHARED]: Call _dl_debug_initialize.
* nscd: Make SELinux checks dynamic.Carlos O'Donell2014-04-144-83/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SELinux team has indicated to me that glibc's SELinux checks in nscd are not being carried out as they would expect the API to be used today. They would like to move away from static header defines for class and permissions and instead use dynamic checks at runtime that provide an answer which is dependent on the runtime status of SELinux i.e. more dynamic. The following patch is a minimal change that moves us forward in this direction. It does the following: * Stop checking for SELinux headers that define NSCD__SHMEMHOST. Check only for the presence or absence of the library. * Don't encode the specific SELinux permission constants into a table at build time, and instead use the symbolic name for the permission as expected. * Lookup the "What do we do if we don't know this permission?" policy and use that if we find SELinux's policy is older than the glibc policy e.g. we make a request for a permission that SELinux doesn't know about. * Lastly, translate the class and permission and then make the permission check. This is done every time we lookup a permission, and this is the expected way to use the API. SELinux will optimize this for us, and we expect the network latencies to hide these extra library calls. Tested on x86, x86-64, and via Fedora Rawhide since November 2013. See: https://sourceware.org/ml/libc-alpha/2014-04/msg00179.html
* Regenerate sparc ULPs.David S. Miller2014-04-132-4/+1026
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* Fix qsort argument order in collation exampleAllan McRae2014-04-123-3/+10
|
* Fix typo on ChangeLog.Paul Pluzhnikov2014-04-111-1/+1
|
* math: make test-fenv-preserve.c a no-op if FE_ALL_EXCEPT == 0.Chris Metcalf2014-04-112-0/+10
| | | | This fixes a testsuite failure for tile (and possibly microblaze).
* 2014-04-11 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2014-04-112-1/+9
| | | | | * elf/Makefile (tests): make tst-dlopen-aout conditional on enable-hardcoded-path-in-tests
* benchtests: Improve readability of JSON outputWill Newton2014-04-116-23/+268
| | | | | | | | | | | | | | | | | | | | Add a small library to print JSON values and use it to improve the readability of the benchmark output and the readability of the benchmark code. ChangeLog: 2014-04-11 Will Newton <will.newton@linaro.org> * benchtests/Makefile (extra-objs): Add json-lib.o. (bench-func): Tidy up JSON output. * benchtests/bench-skeleton.c: Include json-lib.h. (main): Use JSON library functions to do output of benchmark results. * benchtests/bench-timing-type.c (main): Output the timing type simply, leaving formatting to the user. * benchtests/json-lib.c: New file. * benchtests/json-lib.h: Likewise.
* Fixed and unified pthread_once.Torvald Riegel2014-04-1111-735/+149
| | | | | | | [BZ #15215] This unifies various pthread_once architecture-specific implementations which were using the same algorithm with slightly different implementations. It also adds missing memory barriers that are required for correctness.
* S/390: Unify 31 and 64 bit configure.acStefan Liebler2014-04-115-12/+9
|
* NEWS: Add comment about changed ABI on s390 and s390x.Andreas Krebbel2014-04-111-0/+14
|
* Fix typo in comment in res_query.cJoseph Anthony Pasquale Holsten2014-04-112-1/+5
|
* malloc: Fix MALLOC_DEBUG -Wundef warningWill Newton2014-04-112-1/+11
| | | | | | | | | | | | | | | MALLOC_DEBUG is set optionally on the command line. Default the value to zero if it is not set on the command line, and test its value with #if rather than #ifdef. Verified the code is identical before and after this change apart from line numbers. ChangeLog: 2014-04-11 Will Newton <will.newton@linaro.org> * malloc/malloc.c [!MALLOC_DEBUG]: #define MALLOC_DEBUG to zero if it is not defined elsewhere. (mtrim): Test the value of MALLOC_DEBUG with #if rather than #ifdef.
* benchtests: Add pthread_once common-case test.Torvald Riegel2014-04-105-1/+44
| | | | | | | | | We have a single thread that runs a no-op initialization once and then repeatedly runs checks of the initialization (i.e., an acquire load and conditional jump) in a tight loop. This gives us, on average, the best-case latency of pthread_once (the initialization is the exactly-once slow path, and we're not looking at initialization-related synchronization overheads in this case).
* Save/restore bound registers in _dl_runtime_resolveIgor Zamyatin2014-04-095-20/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch saves and restores bound registers in symbol lookup for x86-64: 1. Branches without BND prefix clear bound registers. 2. x86-64 pass bounds in bound registers as specified in MPX psABI extension on hjl/mpx/master branch at https://github.com/hjl-tools/x86-64-psABI https://groups.google.com/forum/#!topic/x86-64-abi/KFsB0XTgWYc Binutils has been updated to create an alternate PLT to add BND prefix when branching to ld.so. * config.h.in (HAVE_MPX_SUPPORT): New #undef. * sysdeps/x86_64/configure.ac: Set HAVE_MPX_SUPPORT. * sysdeps/x86_64/configure: Regenerated. * sysdeps/x86_64/dl-trampoline.S (REGISTER_SAVE_AREA): New macro. (REGISTER_SAVE_RAX): Likewise. (REGISTER_SAVE_RCX): Likewise. (REGISTER_SAVE_RDX): Likewise. (REGISTER_SAVE_RSI): Likewise. (REGISTER_SAVE_RDI): Likewise. (REGISTER_SAVE_R8): Likewise. (REGISTER_SAVE_R9): Likewise. (REGISTER_SAVE_BND0): Likewise. (REGISTER_SAVE_BND1): Likewise. (REGISTER_SAVE_BND2): Likewise. (_dl_runtime_resolve): Use them. Save and restore Intel MPX bound registers when calling _dl_fixup.
* Define _STRING_ARCH_unaligned unconditionallyAdhemerval Zanella2014-04-0910-16/+31
| | | | | | | This patch defines _STRING_ARCH_unaligned to 0 on default bits/string.h header to avoid undefined compiler warnings on platforms that do not define it. It also make adjustments in code where tests checked if macro existed or not.
* Use statvfs64() for pathconf(_PC_NAME_MAX).Peter TB Brett2014-04-093-17/+15
| | | | | | | | | pathconf(_PC_NAME_MAX) was implemented on top of statfs(). The 32bit version therefore fails EOVERFLOW if the filesystem blockcount is sufficiently large. Most pathconf() queries use statvfs64(), which avoids this issue. This patch modifies pathconf(_PC_NAME_MAX) to do likewise.
* Move __PTHREAD_SPINS definition to architecture specific headerAdhemerval Zanella2014-04-0917-13/+79
| | | | | | | This patch moves the __PTHREAD_SPINS definition to arch specific header since pthread_mutex_t layout is also arch specific. This leads to no need to defining __PTHREAD_MUTEX_HAVE_ELISION and thus removing of the undefined compiler warning.
* PowerPC: Fix --disable-multi-arch buildsAdhemerval Zanella2014-04-0911-6/+31
| | | | | | | | | | This patch fixes some powerpc32 and powerpc64 builds with --disable-multi-arch option along with different --with-cpu=powerN. It cleanups the Implies directories by removing the multiarch folder for non multiarch config and also fixing two assembly implementations: powerpc64/power7/strncat.S that is calling the wrong strlen; and power8/fpu/s_isnan.S that misses the hidden_def and weak_alias directives.
* manual/ipc.texi: Fix AC-safety notes.Carlos O'Donell2014-04-082-2/+6
| | | | | The function sem_close is AC-unsafe because lll_lock* leaks a lock (aculock) and not because of twalk.
* string: Cosmetic cleanup of string functionsWill Newton2014-04-0711-47/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up string functions that do not have a version in gnulib on the assumption that glibc is the canonical upstream copy of this code. basename has a copy in gnulib but it is largely written to handle Windows paths so merging it is not really viable. The changes mostly consist of switching to ANSI function prototypes and removing unused includes. As many of these functions do not get built in a typical build due to architecture optimized versions being used instead I built these by hand to verify there were no build warnings and the code was identical. 2014-04-07 Will Newton <will.newton@linaro.org> * string/basename.c [HAVE_CONFIG_H]: Remove #ifdef and and contents. [!_LIBC] Remove #ifndef and contents. (basename): Use ANSI prototype. [_LIBC] Remove #idef. * string/memccpy.c (__memccpy): Use ANSI prototype. * string/memfrob.c (memfrob): Likewise. * string/strcoll.c (STRCOLL): Likewise. * string/strlen.c (strlen): Likewise. * string/strtok.c (STRTOK): Likewise. * string/strcat.c: Remove unused #include of memcopy.h. (strcat): Use ANSI prototype. * string/strchr.c: Remove unused #include of memcopy.h. (strchr): Use ANSI prototype. * string/strcmp.c: Remove unused #include of memcopy.h. (strcmp): Use ANSI prototype. * string/strcpy.c: Remove unused #include of memcopy.h. (strcpy): Use ANSI prototype.
* PowerPC: define _CALL_ELF if compiler does notAdhemerval Zanella2014-04-067-5/+65
| | | | | | | | | | | | This patch makes the configure adds -D_CALL_ELF=1 when compiler does not define _CALL_ELF (versions before powerpc64le support). It cleans up compiler warnings on old compiler where _CALL_ELF is not defined on powerpc64(be) builds. It does by add a new config.make variable for configure-deduced CPPFLAGS and accumulate into that (confix-extra-cppflags). It also generalizes libc_extra_cflags so it accumulates in sysdeps configure fragmenets.
* PowerPC: Fix nearbyint/nearbyintf result for FE_DOWNWARDAdhemerval Zanella2014-04-065-11/+213
| | | | | | | | | This patch fixes the powerpc32 optimized nearbyint/nearbyintf bogus results for FE_DOWNWARD rounding mode. This is due wrong instructions sequence used in the rounding calculation (two subtractions instead of adition and a subtraction). Fixes BZ#16815.
* tile: Fix cut-and-paste bug in commit fcccd5128.Chris Metcalf2014-04-042-2/+7
|
* manual: clarify buffer behavior in getline [BZ #5666]David Svoboda2014-04-032-1/+8
| | | | | | | | | | | If the user has requested automatic buffer creation, getline may create it and not free things when an error occurs. That means the user is always responsible for calling free() regardless of the return value. The current documentation does not explicitly cover this which leaves it slightly ambiguous to the reader. So clarify things. URL: https://sourceware.org/bugzilla/show_bug.cgi?id=5666
* Factor mmap/munmap of PT_LOAD segments out of _dl_map_object_from_fd et al.Roland McGrath2014-04-0315-214/+391
|
* elf/dl-lookup.c: Remove obsolete comment about nested functionWill Newton2014-04-032-5/+10
| | | | | | | | | | | | The nested function referred to has gone away so remove the comment. Also move the variable declaration down to where other variables of a similar lifetime are declared for clarity. 2014-04-03 Will Newton <will.newton@linaro.org> * elf/dl-lookup.c (do_lookup_x): Remove comment referring to nested function and move variable declarations down to before first use.
* Fix catan, catanh, __ieee754_logf in round-downward mode (bug 16799, bug 16800).Joseph Myers2014-04-0212-14/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes incorrect results from catan and catanh of certain special inputs in round-downward mode (bug 16799), and incorrect results of __ieee754_logf (+/-0) in round-downward mode (bug 16800) that show up through catan/catanh when tested in all rounding modes, but not directly in the testing for logf because the bug gets hidden by the wrappers. Both bugs involve a zero that should be +0 being -0 instead: one computed as (1-x)*(1+x) in the catan/catanh case, and one as (x-x) in the logf case. The fixes ensure positive zero is used. Testing of catan and catanh in all rounding modes is duly enabled. I expect there are various other bugs in special cases in __ieee754_* functions that are normally hidden by the wrappers but would show up for testing with -lieee (or in future with -fno-math-errno if we replace -lieee and _LIB_VERSION with compile-time redirection to new *_noerrno symbol names). Tested x86_64 and x86 and ulps updated accordingly. [BZ #16799] [BZ #16800] * math/s_catan.c (__catan): Avoid passing -0 denominator to atan2 with 0 numerator. * math/s_catanf.c (__catanf): Likewise. * math/s_catanh.c (__catanh): Likewise. * math/s_catanhf.c (__catanhf): Likewise. * math/s_catanhl.c (__catanhl): Likewise. * math/s_catanl.c (__catanl): Likewise. * sysdeps/ieee754/flt-32/e_logf.c (__ieee754_logf): Always divide by positive zero when computing -Inf result. * math/libm-test.inc (catan_test): Use ALL_RM_TEST. (catanh_test): Likewise. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Fix clog / clog10 sign of zero result in round-downward mode (bug 16789).Joseph Myers2014-04-0211-36/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes bug 16789, incorrect sign of (real part) zero result from clog and clog10 in round-downward mode, arising from that real part being computed as 0 - 0. To ensure that an underflow exception occurred, the code used an underflowing value (the next term in the series for log1p) in arithmetic computing the real part of the result, yielding the problematic 0 - 0 computation in some cases even when the mathematical result would be small but positive. The patch changes this code to use the math_force_eval approach to ensuring that an underflowing computation actually occurs. Tests of clog and clog10 are enabled in all rounding modes. Tested x86_64 and x86 and ulps updated accordingly. [BZ #16789] * math/s_clog.c (__clog): Use math_force_eval to ensure underflow instead of using underflowing value in computing result. * math/s_clog10.c (__clog10): Likewise. * math/s_clog10f.c (__clog10f): Likewise. * math/s_clog10l.c (__clog10l): Likewise. * math/s_clogf.c (__clogf): Likewise. * math/s_clogl.c (__clogl): Likewise. * math/libm-test.inc (clog_test): Use ALL_RM_TEST. (clog10_test): Likewise. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Correct IBM long double nextafterl.Alan Modra2014-04-024-17/+52
| | | | | | | | | | | | Fix for values near a power of two, and some tidies. [BZ #16739] * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Correct output when value is near a power of two. Use int64_t for lx and remove casts. Use decimal rather than hex exponent constants. Don't use long double multiplication when double will suffice. * math/libm-test.inc (nextafter_test_data): Add tests. * NEWS: Add 16739 and 16786 to bug list.
* Correct prefetch hint in power7 memrchr.Alan Modra2014-04-022-1/+5
| | | | | | Typo fix. * sysdeps/powerpc/powerpc64/power7/memrchr.S: Correct stream hint.