aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-11hppa: Fix feholdexcpt and fesetenv (Bug 18110).John David Anglin
The constraints in the inline assembly in feholdexcept and fesetenv are incorrect. The assembly modifies the buffer pointer, but doesn't express that in the constraints. The simple fix is to remove the modification of the buffer pointer which is no longer required by the existing code, and adjust the one constraint that did express the modification of bufptr. The change fixes test-fenv when glibc is compiled with recent gcc.
2015-03-11soft-fp: Add _FP_UNREACHABLE.Joseph Myers
This patch makes soft-fp use a new macro _FP_UNREACHABLE in place of calling abort in unreachable default cases of switch statements. _FP_UNREACHABLE expands to call __builtin_unreachable for GCC 4.5 and later; the fallback to abort is thus only for kernel use. Tested for powerpc-nofpu that installed stripped shared libraries are unchanged by this patch. Also tested with the math/ tests for mips64 (in the case of fma there *was* previously an abort call generated, unlike for the other operations - one switch only deals with a subset of classes for one operand based on what could have been generated in the earlier part of fma, whereas the other switches deal with all combinations of two classes - and this is apparently too complicated for the default case to have been optimized away). * soft-fp/soft-fp.h (_FP_UNREACHABLE): New macro. * soft-fp/op-common.h (_FP_MUL): Use _FP_UNREACHABLE instead of abort. (_FP_FMA): Likewise. (_FP_DIV): Likewise.
2015-03-10Let tests result in UNSUPPORTED; use that for unbuildable C++ casesRoland McGrath
2015-03-10Harmonize posix/regcomp.c with gnulib: comment formattingRoland McGrath
2015-03-10hppa: Update libm-test-ulps.Carlos O'Donell
2015-03-10Add test for bug 18104.Joseph Myers
[BZ #18104] * math/auto-libm-test-in: Add another test of pow. * math/auto-libm-test-out: Regenerated.
2015-03-10powerpc: Fix incorrect results for pow when using FMAAdhemerval Zanella
This patch adds no FMA generation for e_pow to avoid precision issues for powerpc. This fixes BZ#18104.
2015-03-10soft-fp: Use multiple-include guards.Joseph Myers
This patch makes soft-fp headers consistently use multiple-include guards, something previously done mainly only in the Linux kernel version. The guard macros aren't the same as those used in the Linux kernel, but there seems to be enough variation in such guards in Linux kernel code that hopefully this version will be acceptable there. Tested for powerpc-nofpu that installed stripped shared libraries are unchanged by this patch. * soft-fp/double.h [SOFT_FP_DOUBLE_H]: New multiple-include guard. * soft-fp/extended.h [SOFT_FP_EXTENDED_H]: Likewise. * soft-fp/op-1.h [SOFT_FP_OP_1_H]: Likewise. * soft-fp/op-2.h [SOFT_FP_OP_2_H]: Likewise. * soft-fp/op-4.h [SOFT_FP_OP_4_H]: Likewise. * soft-fp/op-8.h [SOFT_FP_OP_8_H]: Likewise. * soft-fp/op-common.h [SOFT_FP_OP_COMMON_H]: Likewise. * soft-fp/quad.h [SOFT_FP_QUAD_H]: Likewise. * soft-fp/single.h [SOFT_FP_SINGLE_H]: Likewise. * soft-fp/soft-fp.h (SOFT_FP_H): Define to 1 rather than empty. Add comment on closing #endif.
2015-03-09Minor refactoring:Paul Pluzhnikov
* posix/wordexp.c (CHAR_IN_SET): New macro. (parse_param): Use it.
2015-03-09Update powerpc-fpu ULPs.Adhemerval Zanella
2015-03-09Fix BZ #18043 (c4): buffer-overflow (read past the end) in ↵Paul Pluzhnikov
wordexp/parse_dollars/parse_param
2015-03-08Mention BZ #18042 in NEWS.Paul Pluzhnikov
2015-03-08Fix off-by-one which caused BZ #18042 and add a test for it.Paul Pluzhnikov
2015-03-08Refactor wordexp-test.c such that words always ends at the edge ofPaul Pluzhnikov
unreadable page. This makes it easy to catch overflows, such as BZ #18043 (and BZ #18042).
2015-03-08Cleanup: in preparation for fixing BZ #16734, fix memory leaks exposed byPaul Pluzhnikov
switching fopen()ed streams from mmap to malloc.
2015-03-08hurd: Make libc able to call pthread stubsSamuel Thibault
* sysdeps/mach/hurd/bits/libc-lock.h [_LIBC]: Include <bits/libc-lockP.h>
2015-03-07soft-fp: Support conditional zero-initialization in declarations.Joseph Myers
In the Linux kernel, some architectures have a single function that uses different kinds of unpacking and packing depending on the instruction being emulated, meaning it is not readily visible to the compiler that variables from _FP_DECL and _FP_FRAC_DECL_* macros are only used in cases where they were initialized. The existing copy of soft-fp in the Linux kernel uses zero-initialization to avoid warnings in this case, so while frowned upon as a warning suppression mechanism in code built for glibc it seems appropriate to have such zero-initialization conditional on __KERNEL__. This patch duly adds it, via a macro _FP_ZERO_INIT that expands to empty for non-kernel compilations. Tested for powerpc-nofpu that installed stripped shared libraries are unchanged by this patch. * soft-fp/soft-fp.h (_FP_ZERO_INIT): New macro. Define depending on [__KERNEL__]. * soft-fp/op-1.h (_FP_FRAC_DECL_1): Use _FP_ZERO_INIT. * soft-fp/op-2.h (_FP_FRAC_DECL_2): Likewise. * soft-fp/op-common.h (_FP_DECL): Likewise.
2015-03-06Replace __attribute__((visibility("protected")))H.J. Lu
With copy relocation, address of protected data defined in the shared library may be external. Compiler shouldn't asssume protected data will be local. But due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 __attribute__((visibility("protected"))) doesn't work correctly, we need to use asm (".protected xxx") instead. * elf/ifuncdep2.c (global): Replace __attribute__((visibility("protected"))) with asm (".protected global"). * elf/ifuncmod1.c (global): Likewise. * elf/ifuncmod5.c (global): Likewise.
2015-03-07Fix /* in comment in previous commit.Joseph Myers
2015-03-07soft-fp: Condition sfp-machine.h include path on __KERNEL__.Joseph Myers
My Linux kernel patch to update the kernel to current glibc soft-fp <https://sourceware.org/ml/libc-alpha/2015-02/msg00107.html> still leaves a few small differences between the two copies of soft-fp. I think it's desirable to avoid such differences completely if possible by having one set of sources suitable for use in both places. To that end, this patch introduces a conditional on __KERNEL__ for the path by which sfp-machine.h is included. Tested for powerpc-nofpu that installed stripped shared libraries are unchanged by this patch. * soft-fp/soft-fp.h [!_LIBC && __KERNEL__]: Include <asm/sfp-machine.h> instead of <sfp-machine.h>.
2015-03-06Document test-wrapper-env-only in INSTALL.Roland McGrath
2015-03-06ChangeLog formatRoland McGrath
2015-03-06Fix BZ #18043: buffer-overflow (read past the end) in ↵Paul Pluzhnikov
wordexp/parse_dollars/parse_param
2015-03-06time: ensure failing strptime() tests are reported correctlyVincent Bernat
2015-03-06Fix aio_error thread-safety.Samuel Thibault
* sysdeps/pthread/aio_error.c: New file * sysdeps/pthread/aio_misc.c: Remove optimistic comment about synchronization.
2015-03-06vfprintf: Define WORK_BUFFER_SIZEFlorian Weimer
This constant will allow us to refer to the number of elements in work_buffer across a function call boundary.
2015-03-06vfprintf: Introduce JUMP_TABLE_BASE_LABELFlorian Weimer
This makes the offset handling more explicit and avoids cross-references between the jump tables.
2015-03-06vfprintf: Introduce THOUSANDS_SEP_TFlorian Weimer
This avoids preprocessor conditionals in function declarations.
2015-03-06manual: complete example in error message documentationRical Jasan
The manual gives "an example showing how to handle failure to open a file correctly." The example function, open_sesame, uses the newly-introduced strerror function and errno and program_invocation_short_name variables. It fails to specify GNU extensions, however, so attempts to use it in the following way: int main (void) {open_sesame ("badname");} fail during compilation with "error: ‘program_invocation_short_name’ undeclared", indicating the example is incomplete. The presence of "#include"s suggest everything neccesary for the function to work should be present. For completeness, the example is lacking the following line: #define _GNU_SOURCE as the declarations of program_invocation_*name in errno.h are wrapped in an "#ifdef __USE_GNU" conditional. The documentation of the variables is also expanded, adding that their definition lies in errno.h and noting specifically they are GNU extensions.
2015-03-06manual: drop strerror C89 compatibility noteMike Frysinger
Mentioning systems that are old and don't support C89 is probably a waste of time nowadays. Drop the note.
2015-03-05Avoid re-exec-self in bug-setlocale1.Roland McGrath
2015-03-05Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPYH.J. Lu
ELF_RTYPE_CLASS_NOCOPY in comments is a typo. It should be ELF_RTYPE_CLASS_COPY. [BZ #18082] * sysdeps/alpha/dl-machine.h (elf_machine_type_class): Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY in comments. * sysdeps/arm/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/hppa/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/ia64/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/m68k/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/microblaze/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/nios2/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/s390/s390-32/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/s390/s390-64/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/sh/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/tile/dl-machine.h (elf_machine_type_class): Likewise. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Likewise.
2015-03-04Define ETH_ALEN in generic <netinet/if_ether.h>.Roland McGrath
2015-03-04Split rpcent tests out of tst-netdb.Roland McGrath
2015-03-04Conditionalize some test code for SIGRTMIN, SA_SIGINFO.Roland McGrath
2015-03-04Avoid more C++ tests.Roland McGrath
2015-03-04Avoid C++ tests when the C++ cannot be linked.Roland McGrath
2015-03-04Don't define __CORRECT_ISO_CPP_STRING_H_PROTO for non-GCC compilers (bug 17631)Andreas Schwab
The implementation of __CORRECT_ISO_CPP_STRING_H_PROTO requires support for asm aliases.
2015-03-03powerpc: Fix inline feraiseexcept, feclearexcept macrosAdhemerval Zanella
This patch fixes the inline feraiseexcept and feclearexcept macros for powerpc by casting the input argument to integer before operation on it. It fixes BZ#17776.
2015-03-03Fix localplt test breakage with new readelfAlan Modra
Since 2014-11-24 binutils git commit bb4d2ac2, readelf has appended the symbol version to symbols shown in reloc dumps. [BZ #16512] * scripts/localplt.awk: Strip off symbol version. * NEWS: Mention bug fix.
2015-03-02Deglobalize internal variables in timer_routines.c.Roland McGrath
2015-03-02Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779).Joseph Myers
__ASSUME_PRLIMIT64 is defined in kernel-features.h for kernels 2.6.36 and later, but hppa, microblaze and sh did not add the prlimit64 syscall until 2.6.37. This patch adds corresponding undefines of __ASSUME_PRLIMIT64 to those architectures' kernel-features.h files. (This concludes the kernel-features.h fixes arising out of the review - limited to macros defined in the architecture-independent kernel-features.h file - I did in connection with the move to 2.6.32 minimum kernel version. For that subset of macros - I didn't check any purely architecture-specific macros - I think they are now defined for the correct kernel versions on each architecture after this patch.) [BZ #17779] * sysdeps/unix/sysv/linux/hppa/kernel-features.h [__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64): Undefine. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h [__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64): Likewise. * sysdeps/unix/sysv/linux/sh/kernel-features.h [__LINUX_KERNEL_VERSION < 0x020625] (__ASSUME_PRLIMIT64): Likewise.
2015-03-02Fix BZ 18036 buffer overflow (read past end of buffer) in internal_fnmatchPaul Pluzhnikov
2015-03-02Fix parallel build errorAndreas Schwab
2015-03-02_nss_nis_initgroups_dyn: Return status instead of NSS_STATUS_SUCCESSFlorian Weimer
2015-02-27Avoid unsafe loc_name type casts with additional variableAlexandre Oliva
for ChangeLog [BZ #15969] * locale/findlocale.c (_nl_find_locale): Introduce const version of loc_name and drop unsafe type casts.
2015-02-27Convert dlfcn/tststatic2 to use test-skeleton.Roland McGrath
2015-02-27Compile vismain with -fPIE and link with -pieH.J. Lu
Protocted symbol in shared library can only be accessed from PIE or shared library. Linker in binutils 2.26 enforces it. We must compile vismain with -fPIE and link it with -pie. [BZ #17711] * elf/Makefile (tests): Add vismain only if PIE is enabled. (tests-pie): Add vismain. (CFLAGS-vismain.c): New. * elf/vismain.c: Add comments for PIE requirement.
2015-02-27Fix ldbl-96, ldbl-128ibm atanhl inaccuracy (bug 18046, bug 18047).Joseph Myers
The threshold in ldbl-96 atanhl for when to return the argument, 0x1p-28, is a bit too big, and that in ldbl-128ibm atanhl is much too big (the relevant condition being x^3/3 being < 0.5ulp of x), resulting in errors a bit above the limits of those considered acceptable in glibc in the ldbl-96 case, and in large errors in the ldbl-128ibm case. This patch changes those implementations to use more appropriate thresholds and adds tests around the thresholds for various formats. Tested for x86_64, x86 and powerpc. x86_64 and x86 ulps updated accordingly. [BZ #18046] [BZ #18047] * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c (__ieee754_atanhl): Use 0x1p-56L as threshold for just returning the argument. * sysdeps/ieee754/ldbl-96/e_atanhl.c (__ieee754_atanhl): Use 0x1p-32L as threshold for just returning the argument. * math/auto-libm-test-in: Add more tests of atanh. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulp: Likewise.
2015-02-27Rather than using a C implementation of memmove, directly call memmove, whichWilco Dijkstra
typically has a much faster optimized implementation.