about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* Preserve bound registers in _dl_runtime_resolveH.J. Lu2015-03-162-0/+13
| | | | | | | | | We need to add a BND prefix before indirect branch at the end of _dl_runtime_resolve to preserve bound registers. [BZ #18134] * sysdeps/x86_64/dl-trampoline.S (PRESERVE_BND_REGS_PREFIX): New. (_dl_runtime_resolve): Add a BND prefix before indirect branch.
* * stdlib/setenv.c (__add_to_environ): Revert previous change.Paul Eggert2015-03-152-9/+5
|
* m68k: fix 64-bit arithmetic in atomic operations (bug 18128)Andreas Schwab2015-03-143-9/+16
|
* * stdlib/setenv.c (__add_to_environ):Paul Eggert2015-03-132-1/+14
| | | | Dump core quickly if setenv (..., NULL, ...) is called.
* ARM: Rewrite sysdeps/arm/tls-macros.hRoland McGrath2015-03-132-70/+72
|
* Enhance nscd's inotify support (Bug 14906).Carlos O'Donell2015-03-137-158/+398
| | | | | | | | | | | | | | | | | | | | | | In bug 14906 the user complains that the inotify support in nscd is not sufficient when it comes to detecting changes in the configurationfiles that should be watched for the various databases. The current nscd implementation uses inotify to watch for changes in the configuration files, but adds watches only for IN_DELETE_SELF and IN_MODIFY. These watches are insufficient to cover even the most basic uses by a system administrator. For example using emacs or vim to edit a configuration file should trigger a reload but it might not if the editors use move to atomically update the file. This atomic update changes the inode and thus removes the notification on the file (as inotify is based on inodes). Thus the inotify support in nscd for configuration files is insufficient to account for the average use cases of system administrators and users. The inotify support is significantly enhanced and described here: https://www.sourceware.org/ml/libc-alpha/2015-02/msg00504.html Tested on x86_64 with and without inotify support.
* soft-fp: Define and use _FP_STATIC_ASSERT.Joseph Myers2015-03-125-32/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes soft-fp use static assertions in place of conditional calls to abort, in places where there are checks for conditions (on the types for which a macro is used) that the code is not prepared to handle. The fallback definition of _FP_STATIC_ASSERT (for kernel use only, as only relevant to compilers not supported for building glibc) is as in misc/sys/cdefs.h. This means that soft-fp only ever calls abort for _FP_UNREACHABLE calls in builds with GCC versions before 4.5. Thus, there is no need for an abort declaration or <stdlib.h> include, since the kernel code handles defining abort as a macro itself - and so this avoids any need for an __KERNEL__ condition on the abort declaration to avoid it breaking with the kernel's macro definition. That is, this patch is intended to make glibc's soft-fp code suitable for kernel use with no kernel-local changes to the soft-fp code needed at all. Tested for powerpc-nofpu that installed stripped shared libraries are unchanged by the patch. One explicit <stdlib.h> include had to be added to a file that was relying on the include from soft-fp.h. * soft-fp/soft-fp.h (_FP_STATIC_ASSERT): New macro. [_LIBC]: Do not include <stdlib.h>. [!_LIBC] (abort): Remove declaration. * soft-fp/op-2.h (_FP_MUL_MEAT_2_120_240_double): Use _FP_STATIC_ASSERT instead of conditionally calling abort. * soft-fp/op-common.h (_FP_FROM_INT): Likewise. (_FP_EXTEND_CNAN): Likewise. (FP_TRUNC): Likewise. (__FP_CLZ): Likewise. * sysdeps/powerpc/nofpu/flt-rounds.c: Include <stdlib.h>.
* manual: fix XPG basename prototypeYaakov Selkowitz2015-03-122-1/+5
| | | | * manual/string.texi (XPG basename): Fix prototype.
* S/390: Fix setcontext/swapcontext which are not restoring sigmask.Stefan Liebler2015-03-128-30/+264
|
* S/390: Regenerate ULPsStefan Liebler2015-03-122-10/+33
|
* Fix ldconfig segmentation fault with corrupted cache (Bug 18093).Aurelien Jarno2015-03-113-2/+10
| | | | | | | | | | | | | | | | | | | | ldconfig is using an aux-cache to speed up the ld.so.cache update. It is read by mmaping the file to a structure which contains data offsets used as pointers. As they are not checked, it is not hard to get ldconfig to segfault with a corrupted file. This happens for instance if the file is truncated, which is common following a filesystem check following a system crash. This can be reproduced for example by truncating the file to roughly half of it's size. There is already some code in elf/cache.c (load_aux_cache) to check for a corrupted aux cache, but it happens to be broken and not enough. The test (aux_cache->nlibs >= aux_cache_size) compares the number of libs entry with the cache size. It's a non sense, as it basically assumes that each library entry is a 1 byte... Instead this commit computes the theoretical cache size using the headers and compares it to the real size.
* Fix BZ #18043 comment # 19: don't call undefined setenv(..., NULL, 1).Paul Pluzhnikov2015-03-112-1/+6
|
* powerpc: Remove HAVE_ASM_GLOBAL_DOT_NAME defineAdhemerval Zanella2015-03-1110-186/+51
| | | | | | | | | With AIX port deprecated there is no need to check/define HAVE_ASM_GLOBAL_DOT_NAME anymore since the current minimum binutils supported (2.22) does not emit global symbol with dot. This patch removes all the HAVE_ASM_GLOBAL_DOT_NAME definition and checks for powerpc64 port.
* hppa: update __O_SYNC fix with [BZ #18068]Mike Frysinger2015-03-112-2/+3
|
* hppa: Fix feupdateenv and fesetexceptflag (Bug 18111).Carlos O'Donell2015-03-115-11/+44
| | | | | | | | | | The function feupdateenv has been fixed to correctly handle FE_DFL_ENV and FE_NOMASK_ENV. The fesetexceptflag function has been fixed to correctly handle setting the new flags instead of just OR-ing the existing flags. This fixes the test-fenv-return and test-fenvinline failures on hppa.
* hppa: Fix feholdexcpt and fesetenv (Bug 18110).John David Anglin2015-03-114-9/+15
| | | | | | | | | | | 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.
* soft-fp: Add _FP_UNREACHABLE.Joseph Myers2015-03-113-4/+21
| | | | | | | | | | | | | | | | | | | | | | 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.
* Let tests result in UNSUPPORTED; use that for unbuildable C++ casesRoland McGrath2015-03-107-33/+69
|
* Harmonize posix/regcomp.c with gnulib: comment formattingRoland McGrath2015-03-102-32/+37
|
* hppa: Update libm-test-ulps.Carlos O'Donell2015-03-102-0/+929
|
* Add test for bug 18104.Joseph Myers2015-03-103-0/+52
| | | | | | [BZ #18104] * math/auto-libm-test-in: Add another test of pow. * math/auto-libm-test-out: Regenerated.
* powerpc: Fix incorrect results for pow when using FMAAdhemerval Zanella2015-03-103-1/+7
| | | | | This patch adds no FMA generation for e_pow to avoid precision issues for powerpc. This fixes BZ#18104.
* soft-fp: Use multiple-include guards.Joseph Myers2015-03-1011-2/+61
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Minor refactoring:Paul Pluzhnikov2015-03-092-3/+12
| | | | | * posix/wordexp.c (CHAR_IN_SET): New macro. (parse_param): Use it.
* Update powerpc-fpu ULPs.Adhemerval Zanella2015-03-092-50/+70
|
* Fix BZ #18043 (c4): buffer-overflow (read past the end) in ↵Paul Pluzhnikov2015-03-093-3/+11
| | | | wordexp/parse_dollars/parse_param
* Mention BZ #18042 in NEWS.Paul Pluzhnikov2015-03-081-1/+1
|
* Fix off-by-one which caused BZ #18042 and add a test for it.Paul Pluzhnikov2015-03-083-2/+8
|
* Refactor wordexp-test.c such that words always ends at the edge ofPaul Pluzhnikov2015-03-082-31/+44
| | | | | | unreadable page. This makes it easy to catch overflows, such as BZ #18043 (and BZ #18042).
* Cleanup: in preparation for fixing BZ #16734, fix memory leaks exposed byPaul Pluzhnikov2015-03-082-7/+12
| | | | switching fopen()ed streams from mmap to malloc.
* hurd: Make libc able to call pthread stubsSamuel Thibault2015-03-082-0/+11
| | | | | * sysdeps/mach/hurd/bits/libc-lock.h [_LIBC]: Include <bits/libc-lockP.h>
* soft-fp: Support conditional zero-initialization in declarations.Joseph Myers2015-03-075-6/+26
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Replace __attribute__((visibility("protected")))H.J. Lu2015-03-064-3/+29
| | | | | | | | | | | | | | | | | 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.
* Fix /* in comment in previous commit.Joseph Myers2015-03-071-1/+1
|
* soft-fp: Condition sfp-machine.h include path on __KERNEL__.Joseph Myers2015-03-072-0/+9
| | | | | | | | | | | | | | | | | 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>.
* Document test-wrapper-env-only in INSTALL.Roland McGrath2015-03-063-9/+25
|
* ChangeLog formatRoland McGrath2015-03-061-1/+0
|
* Fix BZ #18043: buffer-overflow (read past the end) in ↵Paul Pluzhnikov2015-03-064-2/+39
| | | | wordexp/parse_dollars/parse_param
* time: ensure failing strptime() tests are reported correctlyVincent Bernat2015-03-063-8/+8
|
* Fix aio_error thread-safety.Samuel Thibault2015-03-063-8/+57
| | | | | | * sysdeps/pthread/aio_error.c: New file * sysdeps/pthread/aio_misc.c: Remove optimistic comment about synchronization.
* vfprintf: Define WORK_BUFFER_SIZEFlorian Weimer2015-03-062-13/+15
| | | | | This constant will allow us to refer to the number of elements in work_buffer across a function call boundary.
* vfprintf: Introduce JUMP_TABLE_BASE_LABELFlorian Weimer2015-03-062-3/+8
| | | | | This makes the offset handling more explicit and avoids cross-references between the jump tables.
* vfprintf: Introduce THOUSANDS_SEP_TFlorian Weimer2015-03-062-18/+10
| | | | This avoids preprocessor conditionals in function declarations.
* manual: complete example in error message documentationRical Jasan2015-03-062-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* manual: drop strerror C89 compatibility noteMike Frysinger2015-03-062-3/+5
| | | | | Mentioning systems that are old and don't support C89 is probably a waste of time nowadays. Drop the note.
* Avoid re-exec-self in bug-setlocale1.Roland McGrath2015-03-056-43/+32
|
* Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPYH.J. Lu2015-03-0518-17/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Define ETH_ALEN in generic <netinet/if_ether.h>.Roland McGrath2015-03-042-3/+7
|
* Split rpcent tests out of tst-netdb.Roland McGrath2015-03-044-44/+82
|
* Conditionalize some test code for SIGRTMIN, SA_SIGINFO.Roland McGrath2015-03-046-11/+41
|