Commit Graph

15376 Commits

Author SHA1 Message Date
Siddhesh Poyarekar
96df079a42 Add copyright header to test-strchrnul.c 2013-06-04 16:40:55 +05:30
Siddhesh Poyarekar
d180203e97 Increase test case timeout 2013-06-04 11:23:54 +05:30
Carlos O'Donell
8b0ccb2d7f BZ #15536: Fix ulp for 128-bit IBM long double.
In 128-bit IBM long double the precision of the type
decreases as you approach subnormal numbers, equaling
that of a double for subnormal numbers. Therefore
adjust the computation in ulp to use 2^(MIN_EXP - MANT_DIG)
which is correct for FP_SUBNORMAL for all types.
2013-06-03 14:49:48 -04:00
Carlos O'Donell
3b3c4d40c1 Revert po and pot files changes.
Upstream TP should modify PO files and POT file
should be empty template.
2013-05-31 13:34:42 -04:00
Joseph Myers
fab7ce3f5b Link extra-libs consistently with libc and ld.so. 2013-05-31 16:16:33 +00:00
Patsy Franklin
eca5920cd9 Set reasonable limits for xdr_requests.
[BZ #15553] Increased the current limits large enough to load large
key and data values, but small enough to not pose a DoS threat.
2013-05-30 22:01:22 -04:00
Jeff Law
96945714ec [BZ #14256]
* manual/errno.texi (ESTALE): Update to account for more than
        just NFS file systems.
        * sysdeps/gnu/errlist.c: Regenerated.
2013-05-30 05:51:22 -06:00
Siddhesh Poyarekar
b937534868 Avoid crashing in LD_DEBUG when program name is unavailable
Resolves: #15465

The program name may be unavailable if the user application tampers
with argc and argv[].  Some parts of the dynamic linker caters for
this while others don't, so this patch consolidates the check and
fallback into a single macro and updates all users.
2013-05-29 21:34:12 +05:30
Carlos O'Donell
8a9f20c83c Add descriptive titles to po files and header.
Added descriptive titles to the Belarusian,
English (American), and Chinese (simplified)
po/pot files.

---

2013-05-28  Carlos O'Donell  <carlos@redhat.com>

	* po/be.po: Add descriptive title.
	* po/zh_CN.po: Likewise.
	* po/header.pot: Likewise.
2013-05-28 23:54:07 -04:00
Mike Frysinger
0e60d68ef0 localedef: include file name in error messages
When mkstemp fails, the error message the user gets back is:
cannot create temporary file: No such file or directory

That isn't terribly useful in figuring out why, so include the full
filename we tried to create in the error output.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-05-25 14:38:38 -04:00
Ben Norht
56b672e92e Doc fix for 'frexp' in arith.texi
It is the magnitude of the return value which lies
in [0.5, 1), not the return value itself.

---

2013-05-28  Ben North  <ben@redfrontdoor.org>

	* manual/arith.texi (frexp): It is the magnitude of the return
	value which lies in [0.5, 1), not the return value itself.
2013-05-28 17:20:24 -04:00
Adhemerval Zanella
5e056687df Update powerpc libm-test ULPs. 2013-05-28 08:39:00 -05:00
Thomas Schwinge
528c24058f * stdio-common/bug26.c (main): Correct fscanf template.
Fixup for commit 6ecec3b616.
2013-05-26 21:59:24 +02:00
Thomas Schwinge
07b4c13d0b _dl_skip_args declaration cleanup.
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start:go): Don't
	declare _dl_skip_args.

Continuation of commit 8347c74cc5.
2013-05-26 19:48:25 +02:00
Thomas Schwinge
ec9dd97cec _dl_non_dynamic_init declaration cleanup.
* sysdeps/mach/hurd/i386/init-first.c (_dl_non_dynamic_init):
	Don't declare.

Continuation of commit bc16e260d0.
2013-05-26 18:53:19 +02:00
Thomas Schwinge
2b66ef5d55 * manual/platform.texi: Add missing @end deftypefun.
Fixup for commit d116b7c414.
2013-05-26 18:06:30 +02:00
Joseph Myers
0323d08657 Fix ldbl-96 hypotl of subnormals (bug 15529). 2013-05-24 20:52:55 +00:00
Joseph Myers
dd4259b9f7 Test drem and pow10 in libm-test.inc. 2013-05-24 20:33:14 +00:00
Joseph Myers
4f8dfe270b Use same tests for isfinite/finite, lgamma/gamma. 2013-05-24 19:21:22 +00:00
Adhemerval Zanella
d116b7c414 PowerPC: Program Priority Register support
This patch add inline functions to change the Program Priority Register
from ISA 2.05.
2013-05-24 13:29:30 -05:00
Carlos O'Donell
e96e37676f Correctly compute ulp near zero.
The current value used for ulp near zero is wrong,
and this commit fixes it such that ulp(0) is the smallest
subnormal value nearest to zero, which makes the most
sense for testing values near zero. Note that this is not
what Java does; they use the nearest normal value, which
is less accurate than what we want for glibc. Note that
there is no correct implementation of ulp since there
is no strict mathmatical definition that is accepted by
all groups using IEEE 754.

Previously with the large ulp values near zero there
were tests that previously passed, but were in fact
billions of ulp away from the precise answer. With this
commit we now need to disable one of the cpow tests which
is revealed to be inaccurate (bug 14473).

---

2013-05-24  Carlos O'Donell  <carlos@redhat.com>

	* math/libm-test.inc (MAX_EXP): Define.
	(ULPDIFF): Define.
	(ulp): New function.
	(check_float_internal): Use ULPDIFF.
	(cpow_test): Disable failing test.
	(check_ulp): Test ulp() implemetnation.
	(main): Call check_ulp before starting tests.
2013-05-24 14:23:15 -04:00
Joseph Myers
e8bdba36c5 Remove libm-test START_DATA and END_DATA. 2013-05-24 13:10:42 +00:00
Joseph Myers
b679a606ca Make libm-test START and END into ordinary macros. 2013-05-24 12:22:04 +00:00
Ondrej Bilka
bae143d270 Initialize wide struct info.
Fixes 15381.

Using wide character function is on byte oriented memstream is undefined
behaviour.  This behaviour was masked by not initializing wide struct
info. We now initialize it to cause a predictable crash.
2013-05-24 08:34:10 +02:00
Ryan S. Arnold
d4ea44a04b Add BZ # to ChangeLog for commit 9323d39bae 2013-05-23 10:39:05 -05:00
Edjunior Machado
9323d39bae PowerPC: Add functions for shared resources hints. 2013-05-23 10:32:47 -05:00
Carlos O'Donell
13e23af76e Update comments in ldconfig.c and dl-hwcaps.c.
In dl-hwcaps.c the comment read that rounding was done
to ElfW(Addr), but it's actually rounded to ElfW(Word).

In ldconfig.c we make each comment a sentence and
mention that the "tls" pseudo-hwcap is just for legacy
installations where TLS was optional.

---

2013-05-22  Carlos O'Donell  <carlos@redhat.com>

	* elf/ldconfig.c (is_hwcap_platform): Make comments full setences.
	(main): Mention "tls" pseudo-hwcap is legacy.
	* elf/dl-hwcaps.c (_dl_important_hwcaps): Correct rounding comment.
2013-05-22 23:22:36 -04:00
Joseph Myers
351fe55087 Don't include function names in test data in generated libm-test.c. 2013-05-22 21:01:44 +00:00
Edjunior Barbosa Machado
85118d4de3 Update bits/siginfo.h with Linux hwpoison SIGBUS changes
Adds new SIGBUS error codes for hardware poison signals, syncing with
the current kernel headers (v3.9). It also adds si_trapno field for
alpha.
2013-05-22 14:19:49 -05:00
Carlos O'Donell
7a44c18fb4 Fix _nl_find_msg malloc failure case, and callers.
This patch fixes two issues, and perhaps should be two distinct commits,
but I present it here as one for the sake of completeness.

Commit 006dd86111 fails to check malloc's
return in intl/dcigettext.c (_nl_find_msg):
~~~
      freemem_size = INITIAL_BLOCK_SIZE;
      newmem = (transmem_block_t *) malloc (freemem_size);
...
      newmem->next = transmem_list;
      transmem_list = newmem;
~~~
If malloc fails then newmem is NULL then newmem->next results in a
fault.

The fix is easy enough, check for newmem != NULL, and fall through to
the error condition below which returns (char *) -1 e.g. resource error.

The problem is that returning (char *) -1  will break all sorts of other
code, so while what we did is correct, the real failure case fix is
slightly broader.

There are 4 other places where _nl_find_msg is called, one is OK, the
other three are fixed to handle -1 error return value.

No regressions on x86-64 or x86.

However, no regressions isn't really a useful metric for this code.

The change was tested as documented here:
http://sourceware.org/glibc/wiki/Testing/WhiteBox
using SystemTap for fault injection to simulate malloc failure.

---

2013-05-03  Carlos O'Donell  <carlos at redhat.com>

	[BZ #15441]
	* intl/dcigettext.c (DCIGETTEXT): Skip translating if _nl_find_msg
	returns -1.
	(_nl_find_msg): Return -1 if recursive call returned -1. If newmem is
	null return -1.
	* intl/loadmsgcat.c (_nl_load_domain): If _nl_find_msg returns -1 abort
	loading the domain.
2013-05-22 14:50:26 -04:00
Joseph Myers
b50a71810b Don't include expected results in libm-test test names. 2013-05-22 11:49:36 +00:00
Siddhesh Poyarekar
3ce9e01097 Sort benchmark functions 2013-05-22 11:07:39 +05:30
Siddhesh Poyarekar
051063c88b Add benchmark inputs for math functions
Add benchmark inputs for inverse and hyperbolic trigonometric
functions and log.
2013-05-22 11:07:33 +05:30
Dmitry V. Levin
47c22455d4 Test getaddrinfo return value
This helps testing for regression of BZ#15339.  Creation of network
isolated environments is a privileged operation and therefore is not
included to the test.
2013-05-21 17:21:05 +00:00
Siddhesh Poyarekar
3d04f5db20 Set EAI_SYSTEM only when h_errno is NETDB_INTERNAL
Fixes BZ #15339.

NSS_STATUS_UNAVAIL may mean that a necessary input resource is not
available.  This could occur in a number of cases including when the
network is down, system runs out of file descriptors, etc.  The
correct differentiator in such a case is the h_errno, which gives the
nature of failure.  In case of failures other than a simple 'not
found', we set h_errno as NETDB_INTERNAL and let errno be the
identifier for the exact error.
2013-05-21 21:54:41 +05:30
Andreas Schwab
d5dd6189d5 Fix parsing of numeric hosts in gethostbyname_r 2013-05-21 12:26:33 +02:00
Siddhesh Poyarekar
fef94eab0b Add a README for benchtests
Move instructions from the Makefile here and expand on them.
2013-05-21 14:59:50 +05:30
Andreas Schwab
e39adf43c7 AArch64: Don't clobber argument for tail call to __sigjmp_save in sigsetjmp 2013-05-21 10:52:46 +02:00
Adhemerval Zanella
68191c1d59 PowerPC: update missing CL/NEWS bug reference
Update ChangLog bugzilla number and NEWS for commit
13d3b41a36 (PowerPC: fix hypot/hypotf
check for -INF).
2013-05-20 09:35:01 -05:00
Ondrej Bilka
b2b671b677 Faster memset on x64
This implementation speed up memset in several ways. First is avoiding
expensive computed jump. Second is using fact that arguments of memset
are most of time aligned to 8 bytes.

Benchmark results on:
kam.mff.cuni.cz/~ondra/benchmark_string/memset_profile_result27_04_13.tar.bz2
2013-05-20 08:32:45 +02:00
Ondrej Bilka
2d48b41c8f Faster memcpy on x64.
We add new memcpy version that uses unaligned loads which are fast
on modern processors. This allows second improvement which is avoiding
computed jump which is relatively expensive operation.

Tests available here:
http://kam.mff.cuni.cz/~ondra/memcpy_profile_result27_04_13.tar.bz2
2013-05-20 08:24:41 +02:00
Joseph Myers
3e69426875 Fix nearbyint scheduling of arithmetic past fesetenv (bug 15490). 2013-05-19 18:40:25 +00:00
Joseph Myers
db62a90753 Handle sincos with generic libm-test logic. 2013-05-19 14:45:41 +00:00
Joseph Myers
f16cc3eb81 Simplify gen-libm-test.pl handling of tests with extra outputs. 2013-05-19 14:40:40 +00:00
Joseph Myers
2ee094ff75 Don't disable CMPLXL macro for __NO_LONG_DOUBLE_MATH (bug 15488). 2013-05-18 12:12:38 +00:00
Joseph Myers
3779b5b64a Make libm-test look up ulps by name at runtime. 2013-05-18 12:10:59 +00:00
Joseph Myers
bb38759d6d Fix remainder exceptions and directed-rounding results (bugs 15480, 15485). 2013-05-17 19:04:08 +00:00
Joseph Myers
a00bdcf0e0 Simplify libm-test extra-output initialization. 2013-05-17 19:02:19 +00:00
Joseph Myers
de407f79a2 Don't handle ulps for integer tests in libm-test.inc. 2013-05-17 19:01:27 +00:00
Joseph Myers
8269107fe6 Test more cases of "inexact" exceptions in libm-test.inc. 2013-05-17 14:45:50 +00:00