Commit Graph

28615 Commits

Author SHA1 Message Date
Roland McGrath
44a6213c8e Let tests result in UNSUPPORTED; use that for unbuildable C++ cases 2015-03-10 15:13:14 -07:00
Roland McGrath
d3821ab0ac Harmonize posix/regcomp.c with gnulib: comment formatting 2015-03-10 13:53:34 -07:00
Carlos O'Donell
85ca85ae9a hppa: Update libm-test-ulps. 2015-03-10 16:09:37 -04:00
Joseph Myers
6411f81da9 Add test for bug 18104.
[BZ #18104]
	* math/auto-libm-test-in: Add another test of pow.
	* math/auto-libm-test-out: Regenerated.
2015-03-10 17:53:40 +00:00
Adhemerval Zanella
d421868bb8 powerpc: Fix incorrect results for pow when using FMA
This patch adds no FMA generation for e_pow to avoid precision issues
for powerpc.  This fixes BZ#18104.
2015-03-10 09:38:54 -04:00
Joseph Myers
a2f8be9c83 soft-fp: Use multiple-include guards.
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-10 00:32:29 +00:00
Paul Pluzhnikov
01d032e0bb Minor refactoring:
* posix/wordexp.c (CHAR_IN_SET): New macro.
	(parse_param): Use it.
2015-03-09 14:41:35 -07:00
Adhemerval Zanella
d439bc56e1 Update powerpc-fpu ULPs. 2015-03-09 13:42:42 -04:00
Paul Pluzhnikov
5f85a4bf94 Fix BZ #18043 (c4): buffer-overflow (read past the end) in wordexp/parse_dollars/parse_param 2015-03-09 07:22:36 -07:00
Paul Pluzhnikov
95f386609f Mention BZ #18042 in NEWS. 2015-03-08 21:58:26 -07:00
Paul Pluzhnikov
f8ba70e9f8 Fix off-by-one which caused BZ #18042 and add a test for it. 2015-03-08 21:55:13 -07:00
Paul Pluzhnikov
36103ba2f5 Refactor wordexp-test.c such that words always ends at the edge of
unreadable page.

This makes it easy to catch overflows, such as BZ #18043 (and BZ #18042).
2015-03-08 21:37:31 -07:00
Paul Pluzhnikov
18d26750dd Cleanup: in preparation for fixing BZ #16734, fix memory leaks exposed by
switching fopen()ed streams from mmap to malloc.
2015-03-08 09:46:53 -07:00
Samuel Thibault
9f95dc5d22 hurd: Make libc able to call pthread stubs
* sysdeps/mach/hurd/bits/libc-lock.h [_LIBC]: Include
	<bits/libc-lockP.h>
2015-03-08 11:26:57 +01:00
Joseph Myers
b838844bc5 soft-fp: Support conditional zero-initialization in declarations.
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-07 01:39:42 +00:00
H.J. Lu
e0ed2fb40a Replace __attribute__((visibility("protected")))
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-06 17:05:42 -08:00
Joseph Myers
0b3467b344 Fix /* in comment in previous commit. 2015-03-07 00:59:56 +00:00
Joseph Myers
fa9dda6493 soft-fp: Condition sfp-machine.h include path on __KERNEL__.
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-07 00:36:02 +00:00
Roland McGrath
4acc27ed0a Document test-wrapper-env-only in INSTALL. 2015-03-06 10:59:15 -08:00
Roland McGrath
00f00cfc37 ChangeLog format 2015-03-06 10:52:53 -08:00
Paul Pluzhnikov
895c30cb00 Fix BZ #18043: buffer-overflow (read past the end) in wordexp/parse_dollars/parse_param 2015-03-06 09:13:16 -08:00
Vincent Bernat
5df56c7e3a time: ensure failing strptime() tests are reported correctly 2015-03-06 06:06:26 -05:00
Samuel Thibault
1cdf2ea1fa Fix aio_error thread-safety.
* sysdeps/pthread/aio_error.c: New file
* sysdeps/pthread/aio_misc.c: Remove optimistic comment about
synchronization.
2015-03-06 11:32:24 +01:00
Florian Weimer
1597b7447a vfprintf: Define WORK_BUFFER_SIZE
This constant will allow us to refer to the number of elements in
work_buffer across a function call boundary.
2015-03-06 11:06:33 +01:00
Florian Weimer
627e7a5f5b vfprintf: Introduce JUMP_TABLE_BASE_LABEL
This makes the offset handling more explicit and avoids
cross-references between the jump tables.
2015-03-06 10:29:49 +01:00
Florian Weimer
d176a41a62 vfprintf: Introduce THOUSANDS_SEP_T
This avoids preprocessor conditionals in function declarations.
2015-03-06 10:26:58 +01:00
Rical Jasan
7e7af3496e manual: complete example in error message documentation
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-06 00:59:49 -05:00
Mike Frysinger
4ca8ddfb05 manual: drop strerror C89 compatibility note
Mentioning systems that are old and don't support C89 is probably
a waste of time nowadays.  Drop the note.
2015-03-06 00:57:43 -05:00
Roland McGrath
9162c01d09 Avoid re-exec-self in bug-setlocale1. 2015-03-05 12:58:49 -08:00
H.J. Lu
209826bcf2 Replace ELF_RTYPE_CLASS_NOCOPY with ELF_RTYPE_CLASS_COPY
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-05 08:40:41 -08:00
Roland McGrath
8bff5aab5b Define ETH_ALEN in generic <netinet/if_ether.h>. 2015-03-04 16:11:31 -08:00
Roland McGrath
2752f3381b Split rpcent tests out of tst-netdb. 2015-03-04 15:55:38 -08:00
Roland McGrath
2cfe32bc05 Conditionalize some test code for SIGRTMIN, SA_SIGINFO. 2015-03-04 15:14:56 -08:00
Roland McGrath
e27176eea8 Avoid more C++ tests. 2015-03-04 14:11:39 -08:00
Roland McGrath
e4693aa7c1 Avoid C++ tests when the C++ cannot be linked. 2015-03-04 13:52:45 -08:00
Andreas Schwab
8e2e833ac4 Don't define __CORRECT_ISO_CPP_STRING_H_PROTO for non-GCC compilers (bug 17631)
The implementation of __CORRECT_ISO_CPP_STRING_H_PROTO requires
support for asm aliases.
2015-03-04 11:52:55 +01:00
Adhemerval Zanella
85b290451e powerpc: Fix inline feraiseexcept, feclearexcept macros
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-03 10:01:49 -05:00
Alan Modra
a0af371c25 Fix localplt test breakage with new readelf
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-03 23:43:18 +10:30
Roland McGrath
47465629e7 Deglobalize internal variables in timer_routines.c. 2015-03-02 15:44:27 -08:00
Joseph Myers
6d08b0223a Correct __ASSUME_PRLIMIT64 for hppa/microblaze/sh (bug 17779).
__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-02 23:05:55 +00:00
Paul Pluzhnikov
c2c6d39fab Fix BZ 18036 buffer overflow (read past end of buffer) in internal_fnmatch 2015-03-02 13:34:22 -08:00
Andreas Schwab
e8b6be0016 Fix parallel build error 2015-03-02 15:56:22 +01:00
Florian Weimer
1a2d98aff2 _nss_nis_initgroups_dyn: Return status instead of NSS_STATUS_SUCCESS 2015-03-02 10:08:12 +01:00
Alexandre Oliva
e7f07af50b Avoid unsafe loc_name type casts with additional variable
for  ChangeLog

	[BZ #15969]
	* locale/findlocale.c (_nl_find_locale): Introduce const
	version of loc_name and drop unsafe type casts.
2015-02-27 22:18:56 -03:00
Roland McGrath
c7b19ca99a Convert dlfcn/tststatic2 to use test-skeleton. 2015-02-27 15:54:33 -08:00
H.J. Lu
ef4ad06fe5 Compile vismain with -fPIE and link with -pie
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-27 14:13:28 -08:00
Joseph Myers
2ca725c594 Fix ldbl-96, ldbl-128ibm atanhl inaccuracy (bug 18046, bug 18047).
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-27 17:48:37 +00:00
Wilco Dijkstra
af96be3482 Rather than using a C implementation of memmove, directly call memmove, which
typically has a much faster optimized implementation.
2015-02-27 14:44:41 +00:00
Wilco Dijkstra
ddcf6798d3 Rather than using a C implementation of memset, directly call memset, which
typically has a much faster optimized implementation.
2015-02-27 14:41:46 +00:00
John David Anglin
49f476f479 hppa: fix __O_SYNC to match the kernel 2015-02-27 01:46:01 -05:00