about summary refs log tree commit diff
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* Add and use new glibc-internal futex API.Torvald Riegel2015-07-101-0/+70
| | | | | | | | | | | | | | | | | | | | 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.
* The patch committed to fix bug #18435 caused regressions on aarch64Martin Sebor2015-07-091-0/+7
| | | | | | | | | | | | | 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 ed225df3ad9cbac3c22ec3f0fbbed1f9c61d1c54. * nptl/Makefile (test-xfail-tst-once5): Define.
* Provide __libc_fatal for rtld.Roland McGrath2015-07-091-0/+5
|
* PLT avoidance for _exit in rtld.Roland McGrath2015-07-091-0/+9
|
* Improve bndmov encoding with zero displacementH.J. Lu2015-07-091-0/+5
| | | | | | | | | | 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.
* Preserve bound registers for pointer pass/returnIgor Zamyatin2015-07-091-0/+20
| | | | | | | | | | | | | | | | | | | | | | | 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.
* libio: Update powerpc64le libc.abilistAdhemerval Zanella2015-07-091-0/+5
| | | | | | | This patch adds the missing fmemopen entry for powerpc64le libc abilist check file. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
* hurd: permit to use mlock from non-root processSamuel Thibault2015-07-091-0/+7
| | | | | | | * 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.
* [AArch64][BZ 18648] change greg_t definition in ucontext.hSzabolcs Nagy2015-07-091-0/+4
| | | | | | | | | | | | | | | | | | | | 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).
* [AArch64][BZ 18400] fix elf_prpsinfo in procfs.hSzabolcs Nagy2015-07-091-0/+5
| | | | | | | | | | | | | 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.
* BZ#18383: Conditionalize test-xfail-tst-tlsalign{,-static} on ARM assembler bug.Roland McGrath2015-07-081-0/+7
|
* Fix some places to use $(LN_S) makefile variable.Roland McGrath2015-07-081-0/+4
|
* Install a dummy <rpc/netdb.h> when not building sunrpc/.Roland McGrath2015-07-081-0/+5
|
* libio: Update tst-fmemopen2.cAdhemerval Zanella2015-07-081-0/+5
| | | | | | | | | | | | This patch updates tst-fmemopen2 to check for fmemopen with NULL buffer inputs and also refactor the code a bit. The test relies on a POSIX compliant fmemopen implementation. * stdio-common/tst-fmemopen2.c (do_test): Add test for NULL and zero length buffers. * stdio-common/tst-fmemopen.c (do_test): Refactor to use test-skeleton.c.
* libio: fmemopen rewrite to POSIX complianceAdhemerval Zanella2015-07-081-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch added a new fmemopen version, for glibc 2.22, that aims to be POSIX complaint. It fixes some long-stading glibc fmemopen issues, such as: * it changes the way fseek with SEEK_END works on fmemopen to seek relative to buffer size instead of first '\0'. This is default mode and 'b' opening mode does not change internal behavior (bz#6544). * fix apending opening mode to use as start position either first null byte of len specified in function call (bz#13152 and #13151). * remove binary option 'b' and internal different handling (bz#12836) * fix seek/SEE_END with negative values (bz#14292). A compatibility symbol is provided to with old behavior for older symbols version (2.2.5). * include/stdio.h (fmemopen): Remove hidden prototype. (__fmemopen): Add new hidden prototype. * libio/Makefile: Add oldfmemopen object. * libio/Versions [GLIBC_2.22]: Add new fmemopen symbol. * libio/fmemopen.c (__fmemopen): Function rewrite to be POSIX compliance. * libio/oldfmemopen.c: New file: old fmemopen implementation for symbol compatibility. * stdio-common/Makefile [tests]: Add new tst-fmemopen3. * stdio-common/psiginfo.c [psiginfo]: Call __fmemopen instead of fmemopen. * stdio-common/tst-fmemopen3.c: New file: more fmemopen tests, focus on append and read mode. * sysdeps/unix/sysv/linux/aarch64/libc.abilist [GLIBC_2.22]: Add fmemopen. * sysdeps/unix/sysv/linux/alpha/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist [GLIBC_2.22]: Likewise. * sysdeps/unix/sysv/linux/nios2/libc.abilist [GLIBC_2.22]: Likewise.
* Add missing Advanced API (RFC3542) (1) defines.Carlos O'Donell2015-07-081-1/+7
| | | | | | Fixes bug 18643. Defines IPV6_RECVPATHMTU, IPV6_PATHMTU, and IPV6_DONTFRAG for Linux.
* Use "|" instead of "+" when combine the _IO_LINE_BUF and _IO_UNBUFFERED flagsFeng Gao2015-07-081-0/+7
| | | | | | | | Both of "_IO_UNBUFFERED" and "_IO_LINE_BUF" are the bit flags, but I find there are some codes looks like "_IO_LINE_BUF+_IO_UNBUFFERED", while some codes are "_IO_LINE_BUF|_IO_UNBUFFERED". I think the former is not good, even though the final result is same.
* nscd: drop selinux/flask.h includeMike Frysinger2015-07-081-0/+4
| | | | | | | | | Building nscd w/selinux enabled yields a warning which yields an error: In file included from selinux.c:32:0: /usr/include/selinux/flask.h:5:2: error: #warning "Please remove any #include's of this header in your source code." I've done just that and it builds cleanly with libselinux-2.4.
* pwd.h: add __nonnull markings [BZ #18641]Mike Frysinger2015-07-081-0/+11
| | | | | | Mark all the functions that don't handle NULL pointers as __nonnull. POSIX does not require either behavior, so the prototypes should match the reality of the codebase.
* Fix ruserok scalability with large ~/.rhosts file.Carlos O'Donell2015-07-081-0/+6
| | | | | | | | | | | | | | | | Fixes bug 18557. The ruserok API does hosts checks first while it walks the user's ~/.rhosts file. This results in lots of DNS queries that could have been skipped if we short-circuit test the user portion first to see if would have had a failed match. This supports configurations where rlogin is used on internal secure networks with large numbers of users and machines. The Red Hat QE team did extensive testing on various rlogin combinations to validate this change, and in fact we found a defect in the first version which is fixed in this version.
* Add forced deletion support to _dl_close_workerPavel Kopyl2015-07-071-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://sourceware.org/bugzilla/show_bug.cgi?id=17833 I've a shared library that contains both undefined and unique symbols. Then I try to call the following sequence of dlopen: 1. dlopen("./libfoo.so", RTLD_NOW) 2. dlopen("./libfoo.so", RTLD_LAZY | RTLD_GLOBAL) First dlopen call terminates with error because of undefined symbols, but STB_GNU_UNIQUE ones set DF_1_NODELETE flag and hence block library in the memory. The library goes into inconsistent state as several structures remain uninitialized. For instance, relocations for GOT table were not performed. By the time of second dlopen call this library looks like as it would be fully initialized but this is not true: any call through incorrect GOT table leads to segmentation fault. On some systems this inconsistency triggers assertions in the dynamic linker. This patch adds a parameter to _dl_close_worker to implement forced object deletion in case of dlopen() failure: 1. Clears DF_1_NODELETE bit if forced, to allow library to be removed from memory. 2. For each unique symbol that is defined in this object clears appropriate entry in _ns_unique_sym_table. [BZ #17833] * elf/Makefile (tests): Add tst-nodelete. (modules-names): Add tst-nodelete-uniquemod. (tst-nodelete-uniquemod.so-no-z-defs): New. (tst-nodelete-rtldmod.so-no-z-defs): Likewise. (tst-nodelete-zmod.so-no-z-defs): Likewise. ($(objpfx)tst-nodelete): Likewise. ($(objpfx)tst-nodelete.out): Likewise. (LDFLAGS-tst-nodelete): Likewise. (LDFLAGS-tst-nodelete-zmod.so): Likewise. * elf/dl-close.c (_dl_close_worker): Add a parameter to implement forced object deletion. (_dl_close): Pass false to _dl_close_worker. * elf/dl-open.c (_dl_open): Pass true to _dl_close_worker. * elf/tst-nodelete.cc: New file. * elf/tst-nodeletelib.cc: Likewise. * elf/tst-znodeletelib.cc: Likewise. * include/dlfcn.h (_dl_close_worker): Add a new parameter.
* S390: Fix "backtrace() returns infinitely deep stack frames with ↵Stefan Liebler2015-07-071-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | makecontext()" [BZ #18508]. On s390/s390x backtrace(buffer, size) returns the series of called functions until "makecontext_ret" and additional entries (up to "size") with "makecontext_ret". GDB-backtrace is also warning: "Backtrace stopped: previous frame identical to this frame (corrupt stack?)" To reproduce this scenario you have to setup a new context with makecontext() and activate it with setcontext(). See e.g. cf() function in testcase stdlib/tst-makecontext.c. Or see bug in libgo "Bug 66303 - runtime.Caller() returns infinitely deep stack frames on s390x " (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66303). This patch omits the cfi_startproc/cfi_endproc directives in ENTRY/END macro of __makecontext_ret. Thus no frame information is generated in .eh_frame and backtrace stops after __makecontext_ret. There is also no .eh_frame info for _start or thread_start functions. ChangeLog: [BZ #18508] * stdlib/Makefile ($(objpfx)tst-makecontext3): Depend on $(libdl). * stdlib/tst-makecontext.c (cf): Test if _Unwind_Backtrace is not called infinitely times. (backtrace_helper): New function. (trace_arg): New struct. (st1): Enlarge stack size. * sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S: (__makecontext_ret): Omit cfi_startproc and cfi_endproc. * sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S: Likewise.
* S390: Regenerate ULPs.Stefan Liebler2015-07-071-0/+4
| | | | | | | | | | Regenerated ulps after recent changes. Tested on s390/s390x. All math-tests passes on s390 after this patch. ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.
* S390: Fix sem.h conformance test failures.Stefan Liebler2015-07-071-0/+6
| | | | | | | | | | | | | | | | | | | | On s390 the following tests are failing due to unkown types time_t, pid_t: FAIL: conform/UNIX98/sys/sem.h/conform FAIL: conform/XOPEN2K/sys/sem.h/conform FAIL: conform/XOPEN2K8/sys/sem.h/conform FAIL: conform/XPG3/sys/sem.h/conform FAIL: conform/XPG4/sys/sem.h/conform This patch changes the s390 specific sem.h and includes sys/types.h instead of bits/types.h. All other archs include sys/types.h, too. Including bits/wordsize.h is obselete, because it is already inlcuded in sys/types.h -> bits/types.h. ChangeLog: * sysdeps/unix/sysv/linux/s390/bits/sem.h: Include sys/types.h instead of bits/types.h. Remove inclusion of bits/wordsize.h.
* Add la_symbind32 to x86-64 audit testsH.J. Lu2015-07-071-0/+9
| | | | | | | | | | | | la_symbind32 is used for x32 in x86-64 audit tests. We should define both la_symbind32 and la_symbind64 in x86-64 audit tests. * sysdeps/x86_64/tst-auditmod10b.c (la_symbind32): New. * sysdeps/x86_64/tst-auditmod4b.c (la_symbind32): Likewise. * sysdeps/x86_64/tst-auditmod5b.c (la_symbind32): Likewise. * sysdeps/x86_64/tst-auditmod6b.c (la_symbind32): Likewise. * sysdeps/x86_64/tst-auditmod6c.c (la_symbind32): Likewise. * sysdeps/x86_64/tst-auditmod7b.c (la_symbind32): Likewise.
* Add and use sysdeps/i386/link-defines.symH.J. Lu2015-07-071-0/+10
| | | | | | | | | | | | | Define macros for fields in La_i86_regs and La_i86_retval and use them in dl-trampoline.S, instead of hardcoded values. * sysdeps/i386/Makefile (gen-as-const-headers)[elf]: Add link-defines.sym. * sysdeps/i386/dl-trampoline.S: Include <link-defines.h>. (_dl_runtime_profile): Use LONG_DOUBLE_SIZE, LRV_SIZE, LRV_EAX_OFFSET, LRV_EDX_OFFSET, LRV_ST0_OFFSET, LRV_ST1_OFFSET and LR_SIZE. * sysdeps/i386/link-defines.sym: New file.
* Add a testcase for i386 LD_AUDITH.J. Lu2015-07-071-0/+11
| | | | | | | | | | | | | | This patch adds a testcase for i386 LD_AUDIT to check function return and parameters passed in registers. * sysdeps/i386/Makefile (tests)[elf]: Add tst-audit3. (modules-names): Add tst-auditmod3a tst-auditmod3b. ($(objpfx)tst-audit3): New rule. ($(objpfx)tst-audit3.out): Likewise. * sysdeps/i386/tst-audit3.c: New file. * sysdeps/i386/tst-audit3.h: Likewise. * sysdeps/i386/tst-auditmod3a.c: Likewise. * sysdeps/i386/tst-auditmod3b.c: Likewise.
* Do not create invalid pointers in C code of string functions.Torvald Riegel2015-07-071-0/+8
| | | | | | | | Some of the x86 string functions create pointers based on input strings that may be outside of the input strings. When this happens in C code, the compiler can potentially detect this, leading to warnings in application code when those string functions are inlined. Perform those operations in the assembly code instead of the C code to fix this.
* Set errno to ENOMEM on overflow in sbrk (bug 18592)Cyril Hrubis2015-07-071-0/+5
|
* Inline __ieee754_sqrt and __ieee754_sqrtf. Also add external definitions.Wilco Dijkstra2015-07-061-0/+9
|
* Remove unused file sysdeps/ieee754/support.cWilco Dijkstra2015-07-061-0/+4
|
* [AArch64] make setcontext etc functions consistent with the kernelSzabolcs Nagy2015-07-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since https://sourceware.org/ml/libc-alpha/2014-04/msg00006.html setcontext etc is no longer tied to the kernel use of ucontext. in that patch the ucontext reserved space is not used consistently with the kernel abi: the d8,d9 pair is saved in the slot of q8. this is ok (*context functions work together), but probably not desirable (ucontexts created by the kernel and getcontext are subtly different). the fix just replaces dN with qN in the save/restore code, which does a bit more than needed (saves/restores the top half of qN that is not callee saved), but this should not be an issue (and avoids having to deal with endianness). (kernel fpsimd context layout: the first 64bit contains 0x210 the fpsimd context size and 0x46508001 the FPSIMD_MAGIC, the second 64bit is for fpsr and fpcr, and the rest is the 128bit q0..q31 registers). given d8=8.1, d9=9.1,... d15=15.1, the context created by getcontext is current: (gdb) x/40xg ctx.uc_mcontext.__reserved 0x410df0 <ctx+464>: 0x0000021046508001 0x0000000000000000 0x410e00 <ctx+480>: 0x0000000000000000 0x0000000000000000 0x410e10 <ctx+496>: 0x0000000000000000 0x0000000000000000 0x410e20 <ctx+512>: 0x0000000000000000 0x0000000000000000 0x410e30 <ctx+528>: 0x0000000000000000 0x0000000000000000 0x410e40 <ctx+544>: 0x0000000000000000 0x0000000000000000 0x410e50 <ctx+560>: 0x0000000000000000 0x0000000000000000 0x410e60 <ctx+576>: 0x0000000000000000 0x0000000000000000 0x410e70 <ctx+592>: 0x0000000000000000 0x0000000000000000 0x410e80 <ctx+608>: 0x4020333333333333 0x4022333333333333 0x410e90 <ctx+624>: 0x0000000000000000 0x0000000000000000 0x410ea0 <ctx+640>: 0x4024333333333333 0x4026333333333333 0x410eb0 <ctx+656>: 0x0000000000000000 0x0000000000000000 0x410ec0 <ctx+672>: 0x4028333333333333 0x402a333333333333 0x410ed0 <ctx+688>: 0x0000000000000000 0x0000000000000000 0x410ee0 <ctx+704>: 0x402c333333333333 0x402e333333333333 0x410ef0 <ctx+720>: 0x0000000000000000 0x0000000000000000 0x410f00 <ctx+736>: 0x0000000000000000 0x0000000000000000 0x410f10 <ctx+752>: 0x0000000000000000 0x0000000000000000 0x410f20 <ctx+768>: 0x0000000000000000 0x0000000000000000 fixed: (gdb) x/40xg ctx.uc_mcontext.__reserved 0x410d70 <ctx+464>: 0x0000021046508001 0x0000000000000000 0x410d80 <ctx+480>: 0x0000000000000000 0x0000000000000000 0x410d90 <ctx+496>: 0x0000000000000000 0x0000000000000000 0x410da0 <ctx+512>: 0x0000000000000000 0x0000000000000000 0x410db0 <ctx+528>: 0x0000000000000000 0x0000000000000000 0x410dc0 <ctx+544>: 0x0000000000000000 0x0000000000000000 0x410dd0 <ctx+560>: 0x0000000000000000 0x0000000000000000 0x410de0 <ctx+576>: 0x0000000000000000 0x0000000000000000 0x410df0 <ctx+592>: 0x0000000000000000 0x0000000000000000 0x410e00 <ctx+608>: 0x4020333333333333 0x0000000000000000 0x410e10 <ctx+624>: 0x4022333333333333 0x0000000000000000 0x410e20 <ctx+640>: 0x4024333333333333 0x0000000000000000 0x410e30 <ctx+656>: 0x4026333333333333 0x0000000000000000 0x410e40 <ctx+672>: 0x4028333333333333 0x0000000000000000 0x410e50 <ctx+688>: 0x402a333333333333 0x0000000000000000 0x410e60 <ctx+704>: 0x402c333333333333 0x0000000000000000 0x410e70 <ctx+720>: 0x402e333333333333 0x0000000000000000 0x410e80 <ctx+736>: 0x0000000000000000 0x0000000000000000 0x410e90 <ctx+752>: 0x0000000000000000 0x0000000000000000 0x410ea0 <ctx+768>: 0x0000000000000000 0x0000000000000000 2015-07-06 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/unix/sysv/linux/aarch64/getcontext.S (__getcontext): Use q registers instead of d ones so the layout is kernel abi compatible. * sysdeps/unix/sysv/linux/aarch64/setcontext.S (__setcontext): Likewise. * sysdeps/unix/sysv/linux/aarch64/swapcontext.S (__swapcontext): Likewise.# Please enter the commit message for your changes. Lines starting
* Regenerate aarch64 libm-test-ulpsSzabolcs Nagy2015-07-021-0/+4
| | | | * sysdeps/aarch64/libm-test-ulps: Regenerated.
* Fix ldbl-128 expm1l (-min_subnorm) result sign (bug 18619).Joseph Myers2015-07-011-0/+6
| | | | | | | | | | | | | In the ldbl-128 implementation of expm1l, when expm1l's result should underflow to 0 (argument minus the least subnormal, in some rounding modes), it can be a zero of the wrong sign. This patch fixes this in the same way previously used for the x86 / x86_64 versions. Tested for mips64. [BZ #18619] * sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Force underflow and return argument in case of subnormal argument.
* The C++ 2011 std::call_once function is specified to allowMartin Sebor2015-07-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | the initialization routine to exit by throwing an exception. Such an execution, termed exceptional, requires call_once to propagate the exception to its caller. A program may contain any number of exceptional executions but only one returning execution (which, if it exists, must be the last execution with the same once flag). On POSIX systems such as Linux, std::call_once is implemented in terms of pthread_once. However, as discussed in libstdc++ bug 66146 - "call_once not C++11-compliant on ppc64le," GLIBC's pthread_once hangs when the initialization function exits by throwing an exception on at least arm and ppc64 (though apparently not on x86_64). This effectively prevents call_once from conforming to the C++ requirements since there doesn't appear to be a thread-safe way to work around this problem in libstdc++. This patch changes pthread_once to handle gracefully init functions that exit by throwing exceptions. It was successfully tested on ppc64, ppc64le, and x86_64. [BZ #18435] * nptl/Makefile: Add tst-once5.cc. * nptl/pthreadP.h (pthread_cleanup_push, pthread_cleanup_pop): Remove macro redefinitions. * nptl/tst-once5.cc: New test.
* Regenerate powerpc-nofpu libm-test-ulps.Joseph Myers2015-07-011-0/+2
| | | | * sysdeps/powerpc/nofpu/libm-test-ulps: Regenerated.
* Regenerate ARM libm-test-ulps.Joseph Myers2015-07-011-0/+2
| | | | * sysdeps/arm/libm-test-ulps: Regenerated.
* Regenerate MIPS libm-test-ulps.Joseph Myers2015-07-011-0/+5
| | | | | * sysdeps/mips/mips32/libm-test-ulps: Regenerated. * sysdeps/mips/mips64/libm-test-ulps: Likewise.
* Remove documentation of lowlevellock systemtap probes.Torvald Riegel2015-06-301-0/+3
| | | | | | | The probes are not provided on all architectures (and only partially by the x86 assembly implementation), and we are not aware of actual uses of these probes. a need for them.
* Clean up BUSY_WAIT_NOP and atomic_delay.Torvald Riegel2015-06-301-0/+23
| | | | | | | | | This patch combines BUSY_WAIT_NOP and atomic_delay into a new atomic_spin_nop function and adjusts all clients. The new function is put into atomic.h because what is best done in a spin loop is architecture-specific, and atomics must be used for spinning. The function name is meant to tell users that this has no effect on synchronization semantics but is a performance aid for spinning.
* Improve tgamma accuracy (bug 18613).Joseph Myers2015-06-291-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In non-default rounding modes, tgamma can be slightly less accurate than permitted by glibc's accuracy goals. Part of the problem is error accumulation, addressed in this patch by setting round-to-nearest for internal computations. However, there was also a bug in the code dealing with computing pow (x + n, x + n) where x + n is not exactly representable, providing another source of error even in round-to-nearest mode; it was necessary to address both bugs to get errors for all testcases within glibc's accuracy goals. Given this second fix, accuracy in round-to-nearest mode is also improved (hence regeneration of ulps for tgamma should be from scratch - truncate libm-test-ulps or at least remove existing tgamma entries - so that the expected ulps can be reduced). Some additional complications also arose. Certain tgamma tests should strictly, according to IEEE semantics, overflow or not depending on the rounding mode; this is beyond the scope of glibc's accuracy goals for any function without exactly-determined results, but gen-auto-libm-tests doesn't handle being lax there as it does for underflow. (libm-test.inc also doesn't handle being lax about whether the result in cases very close to the overflow threshold is infinity or a finite value close to overflow, but that doesn't cause problems in this case though I've seen it cause problems with random test generation for some functions.) Thus, spurious-overflow markings, with a comment, are added to auto-libm-test-in (no bug in Bugzilla because the issue is with the testsuite, not a user-visible bug in glibc). And on x86, after the patch I saw ERANGE issues as previously reported by Carlos (see my commentary in <https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>), which needed addressing by ensuring excess range and precision were eliminated at various points if FLT_EVAL_METHOD != 0. I also noticed and fixed a cosmetic issue where 1.0f was used in long double functions and should have been 1.0L. This completes the move of all functions to testing in all rounding modes with ALL_RM_TEST, so gen-libm-have-vector-test.sh is updated to remove the workaround for some functions not using ALL_RM_TEST. Tested for x86_64, x86, mips64 and powerpc. [BZ #18613] * sysdeps/ieee754/dbl-64/e_gamma_r.c (gamma_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gamma_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/flt-32/e_gammaf_r.c (gammaf_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammaf_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. * sysdeps/ieee754/ldbl-128/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * sysdeps/ieee754/ldbl-96/e_gammal_r.c (gammal_positive): Take log of X_ADJ not X when adjusting exponent. (__ieee754_gammal_r): Do intermediate computations in round-to-nearest then adjust overflowing and underflowing results as needed. Use 1.0L not 1.0f as numerator of division. * math/libm-test.inc (tgamma_test_data): Remove one test. Moved to auto-libm-test-in. (tgamma_test): Use ALL_RM_TEST. * math/auto-libm-test-in: Add one test of tgamma. Mark some other tests of tgamma with spurious-overflow. * math/auto-libm-test-out: Regenerated. * math/gen-libm-have-vector-test.sh: Do not check for START. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Fix ldbl-128 j1l spurious underflows (bug 18612).Joseph Myers2015-06-291-0/+7
| | | | | | | | | | | | | | | | | The ldbl-128 implementation of j1l produces spurious underflow exceptions for some small arguments, as a result of squaring the argument. This patch fixes it just to use a linear approximation for sufficiently small arguments, and then to force an underflow exception only in the cases where it is required. Tested for mips64. [BZ #18612] * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_j1l): For small arguments, just return 0.5 times the argument, with underflow forced as needed. * math/auto-libm-test-in: Add more tests of j1. * math/auto-libm-test-out: Regenerated.
* Fix j1, jn missing underflows (bug 16559).Joseph Myers2015-06-291-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Similar to various other bugs in this area, j1 and jn implementations can fail to raise the underflow exception when the internal computation is exact although the actual function is inexact. This patch forces the exception in a similar way to other such fixes. (The ldbl-128 / ldbl-128ibm j1l implementation is different and doesn't need a change for this until spurious underflows in it are fixed.) Tested for x86_64, x86, mips64 and powerpc. [BZ #16559] * sysdeps/ieee754/dbl-64/e_j1.c: Include <float.h>. (__ieee754_j1): Force underflow exception for small results. * sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Likewise. * sysdeps/ieee754/flt-32/e_j1f.c: Include <float.h>. (__ieee754_j1f): Force underflow exception for small results. * sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_jnf): Likewise. * sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-96/e_j1l.c: Include <float.h>. (__ieee754_j1l): Force underflow exception for small results. * sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise. * math/auto-libm-test-in: Add more tests of j1 and jn. * math/auto-libm-test-out: Regenerated.
* Update headers for Linux 4.0, 4.1 definitions.Joseph Myers2015-06-291-0/+11
| | | | | | | | | | | | | | | | | | | This patch updates installed glibc headers for new definitions from Linux 4.0 and 4.1 that seem relevant to glibc headers. In addition, I noticed that PF_IB / AF_IB, added in Linux 3.11, were missing for no obvious reason, so added those as well. Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). * sysdeps/unix/sysv/linux/bits/in.h (IP_CHECKSUM): New macro. * sysdeps/unix/sysv/linux/bits/socket.h (PF_IB): Likewise. (PF_MPLS): Likewise. (AF_IB): Likewise. (AF_MPLS): Likewise. * sysdeps/unix/sysv/linux/sys/mount.h (MS_LAZYTIME): New enum value and macro. (MS_RMT_MASK): Include MS_LAZYTIME.
* malloc: Do not corrupt the top of a threaded heap if top chunk is MINSIZE ↵Mel Gorman2015-06-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | [BZ #18502] mksquashfs was reported in openSUSE to be causing segmentation faults when creating installation images. Testing showed that mksquashfs sometimes failed and could be reproduced within 10 attempts. The core dump looked like the heap top was corrupted and was pointing to an unmapped area. In other cases, this has been due to an application corrupting glibc structures but mksquashfs appears to be fine in this regard. The problem is that heap_trim is "growing" the top into unmapped space. If the top chunk == MINSIZE then top_area is -1 and this check does not behave as expected due to a signed/unsigned comparison if (top_area <= pad) return 0; The next calculation extra = ALIGN_DOWN(top_area - pad, pagesz) calculates extra as a negative number which also is unnoticed due to a signed/unsigned comparison. We then call shrink_heap(heap, negative_number) which crashes later. This patch adds a simple check against MINSIZE to make sure extra does not become negative. It adds a cast to hint to the reader that this is a signed vs unsigned issue. Without the patch, mksquash fails within 10 attempts. With it applied, it completed 1000 times without error. The standard test suite "make check" showed no changes in the summary of test results.
* Add support for DT_MIPS_RLD_MAP_REL.Matthew Fortune2015-06-261-0/+7
| | | | | | | | | | This tag allows debugging of MIPS position independent executables and provides access to shared library information. * elf/elf.h (DT_MIPS_RLD_MAP_REL): New macro. (DT_MIPS_NUM): Update. * sysdeps/mips/dl-machine.h (ELF_MACHINE_DEBUG_SETUP): Handle DT_MIPS_RLD_MAP_REL.
* Use round-to-nearest internally in jn, test with ALL_RM_TEST (bug 18602).Joseph Myers2015-06-251-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some existing jn tests, if run in non-default rounding modes, produce errors above those accepted in glibc, which causes problems for moving tests of jn to use ALL_RM_TEST. This patch makes jn set rounding to-nearest internally, as was done for yn some time ago, then computes the appropriate underflowing value for results that underflowed to zero in to-nearest, and moves the tests to ALL_RM_TEST. It does nothing about the general inaccuracy of Bessel function implementations in glibc, though it should make jn more accurate on average in non-default rounding modes through reduced error accumulation. The recomputation of results that underflowed to zero should as a side-effect fix some cases of bug 16559, where jn just used an exact zero, but that is *not* the goal of this patch and other cases of that bug remain unfixed. (Most of the changes in the patch are reindentation to add new scopes for SET_RESTORE_ROUND*.) Tested for x86_64, x86, powerpc and mips64. [BZ #16559] [BZ #18602] * sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Set round-to-nearest internally then recompute results that underflowed to zero in the original rounding mode. * sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_jnf): Likewise. * sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_jnl.c (__ieee754_jnl): Likewise. * sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise * math/libm-test.inc (jn_test): Use ALL_RM_TEST. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* More correct description of linking with vector math library.Andrew Senkevich2015-06-251-0/+4
| | | | * NEWS: Fixed description of link with vector math library.
* Fix buffer overflow for writes to memory buffer stream (bug 18549)Andreas Schwab2015-06-251-0/+6
|
* Support compilers defaulting to PIEH.J. Lu2015-06-251-0/+12
| | | | | | | | | | | | | | | | | To support building glibc with GCC 6 configured with --enable-default-pie, which generates PIE by default, we need to build programs as PIE. But elf/tst-dlopen-aout must not be built as PIE since it tests dlopen on ET_EXEC file and PIE is ET_DYN. [BZ #17841] * Makeconfig (no-pie-ldflag): New. (+link): Set to $(+link-pie) if default to PIE. (+link-tests): Set to $(+link-pie-tests) if default to PIE. * config.make.in (build-pie-default): New. * configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE is default. AC_SUBST. * configure: Regenerated. * elf/Makefile (LDFLAGS-tst-dlopen-aout): New.