external/glibc.git
11 years agoFix formatting of comment
Andreas Jaeger [Thu, 13 Jun 2013 07:52:49 +0000 (09:52 +0200)]
Fix formatting of comment

11 years agoUpdate sv_FI@euro
Johan Heikkila [Thu, 13 Jun 2013 07:50:02 +0000 (09:50 +0200)]
Update sv_FI@euro

[BZ#15432]
* locales/sv_FI@euro: Add LC_MEASUREMENT.

11 years agoUpdate sv_FI
Johan Heikkila [Thu, 13 Jun 2013 07:49:03 +0000 (09:49 +0200)]
Update sv_FI

[BZ#15431]
* locales/sv_FI: Add LC_MEASUREMENT, use copy in LC_TELEPHONE,
update LC_ADDRESS with using postal_fmt from Finnish Post Office
recommendations at
http://www.posti.fi/hinnatjaohjeet/osoitejakuorimerkinnat/osoitemerkinnat.html
and add missing entries.

11 years agoFix ChangeLog entry
Siddhesh Poyarekar [Thu, 13 Jun 2013 04:49:49 +0000 (10:19 +0530)]
Fix ChangeLog entry

11 years agoImprove precision of clock() function on Linux
Siddhesh Poyarekar [Thu, 13 Jun 2013 04:24:35 +0000 (09:54 +0530)]
Improve precision of clock() function on Linux

Resolves #12515.

Use CLOCK_PROCESS_CPUTIME_ID instead of times to get better precision
in the value returned by clock.

11 years agoFix unsafe compiler optimization
Adhemerval Zanella [Wed, 12 Jun 2013 15:21:22 +0000 (10:21 -0500)]
Fix unsafe compiler optimization

GCC 4.8 enables -ftree-loop-distribute-patterns at -O3 by default and
this optimization may transform loops into memset/memmove calls. Without
proper handling this may generate unexpected PLT calls on GLIBC.
This patch fixes by create memset/memmove alias to internal GLIBC
__GI_memset/__GI_memmove symbols.

11 years agoMake more libm tests condition exceptions tests with math-tests.h.
Joseph Myers [Wed, 12 Jun 2013 12:41:25 +0000 (12:41 +0000)]
Make more libm tests condition exceptions tests with math-tests.h.

11 years agoUpdate Interlingua translation from translation project
Andreas Jaeger [Wed, 12 Jun 2013 08:12:19 +0000 (10:12 +0200)]
Update Interlingua translation from translation project

11 years agoSet/restore rounding mode only when needed
Siddhesh Poyarekar [Wed, 12 Jun 2013 05:06:48 +0000 (10:36 +0530)]
Set/restore rounding mode only when needed

The most common use case of math functions is with default rounding
mode, i.e. rounding to nearest.  Setting and restoring rounding mode
is an unnecessary overhead for this, so I've added support for a
context, which does the set/restore only if the FP status needs a
change.  The code is written such that only x86 uses these.  Other
architectures should be unaffected by it, but would definitely benefit
if the set/restore has as much overhead relative to the rest of the
code, as the x86 bits do.

Here's a summary of the performance improvement due to these
improvements; I've only mentioned functions that use the set/restore
and have benchmark inputs for x86_64:

Before:

cos(): ITERS:4.69335e+08: TOTAL:28884.6Mcy, MAX:4080.28cy, MIN:57.562cy, 16248.6 calls/Mcy
exp(): ITERS:4.47604e+08: TOTAL:28796.2Mcy, MAX:207.721cy, MIN:62.385cy, 15543.9 calls/Mcy
pow(): ITERS:1.63485e+08: TOTAL:28879.9Mcy, MAX:362.255cy, MIN:172.469cy, 5660.86 calls/Mcy
sin(): ITERS:3.89578e+08: TOTAL:28900Mcy, MAX:704.859cy, MIN:47.583cy, 13480.2 calls/Mcy
tan(): ITERS:7.0971e+07: TOTAL:28902.2Mcy, MAX:1357.79cy, MIN:388.58cy, 2455.55 calls/Mcy

After:

cos(): ITERS:6.0014e+08: TOTAL:28875.9Mcy, MAX:364.283cy, MIN:45.716cy, 20783.4 calls/Mcy
exp(): ITERS:5.48578e+08: TOTAL:28764.9Mcy, MAX:191.617cy, MIN:51.011cy, 19071.1 calls/Mcy
pow(): ITERS:1.70013e+08: TOTAL:28873.6Mcy, MAX:689.522cy, MIN:163.989cy, 5888.18 calls/Mcy
sin(): ITERS:4.64079e+08: TOTAL:28891.5Mcy, MAX:6959.3cy, MIN:36.189cy, 16062.8 calls/Mcy
tan(): ITERS:7.2354e+07: TOTAL:28898.9Mcy, MAX:1295.57cy, MIN:380.698cy, 2503.7 calls/Mcy

So the improvements are:

cos: 27.9089%
exp: 22.6919%
pow: 4.01564%
sin: 19.1585%
tan: 1.96086%

The downside of the change is that it will have an adverse performance
impact on non-default rounding modes, but I think the tradeoff is
justified.

11 years agoConvert iso-639.def to utf-8
Siddhesh Poyarekar [Tue, 11 Jun 2013 16:44:43 +0000 (22:14 +0530)]
Convert iso-639.def to utf-8

11 years agoAdd exception information to math-tests.h and use it in libm-test.inc.
Joseph Myers [Tue, 11 Jun 2013 15:44:31 +0000 (15:44 +0000)]
Add exception information to math-tests.h and use it in libm-test.inc.

11 years agoPort remaining string benchmarks
Siddhesh Poyarekar [Tue, 11 Jun 2013 15:21:55 +0000 (20:51 +0530)]
Port remaining string benchmarks

There were a few more string benchmarks (strcpy_chk and stpcpy_check)
in the debug directory that needed to be ported over.

11 years agoPowerPC: Remove redundant ports/sysdeps/powerpc/dl-procinfo.[ch].
Ryan S. Arnold [Tue, 11 Jun 2013 14:33:33 +0000 (09:33 -0500)]
PowerPC: Remove redundant ports/sysdeps/powerpc/dl-procinfo.[ch].

11 years agoPowerPC: Merge ports/ dl-procinfo.[ch] with base.
Ryan S. Arnold [Tue, 11 Jun 2013 14:32:41 +0000 (09:32 -0500)]
PowerPC: Merge ports/ dl-procinfo.[ch] with base.

11 years agoUpdate BIG5-HKSCS charmap to HKSCS-2008
Andreas Schwab [Thu, 10 Jan 2013 16:46:49 +0000 (17:46 +0100)]
Update BIG5-HKSCS charmap to HKSCS-2008

11 years agoFix indentation and add copyright header to time.h
Siddhesh Poyarekar [Tue, 11 Jun 2013 13:12:42 +0000 (18:42 +0530)]
Fix indentation and add copyright header to time.h

11 years agoRemove performance-related bits from string tests
Siddhesh Poyarekar [Tue, 4 Jun 2013 12:41:43 +0000 (18:11 +0530)]
Remove performance-related bits from string tests

11 years agoCopy over string performance tests into benchtests
Siddhesh Poyarekar [Tue, 4 Jun 2013 11:18:56 +0000 (16:48 +0530)]
Copy over string performance tests into benchtests

Copy over already existing string performance tests into benchtests.
Bits not related to performance measurements have been omitted.

11 years agoBegin porting string performance tests to benchtests
Siddhesh Poyarekar [Tue, 16 Apr 2013 12:07:24 +0000 (17:37 +0530)]
Begin porting string performance tests to benchtests

This is the initial support for string function performance tests,
along with copying tests for memcpy and memcpy-ifunc as proof of
concept.  The string function benchmarks perform operations at
different alignments and for different sizes and compare performance
between plain operations and the optimized string operations.  Due to
this their output is incompatible with the function benchmarks where
we're interested in fastest time, throughput, etc.

In future, the correctness checks in the benchmark tests can be
removed.  Same goes for the performance measurements in the
string/test-*.

11 years agoFix handling of netgroup cache in nscd
Andreas Schwab [Mon, 10 Jun 2013 12:39:09 +0000 (14:39 +0200)]
Fix handling of netgroup cache in nscd

11 years agoUpdate Chinese (traditional) translation from translation project
Andreas Jaeger [Tue, 11 Jun 2013 06:49:00 +0000 (08:49 +0200)]
Update Chinese (traditional) translation from translation project

11 years agoFix-trailing-whitespaces-in-libidn.
Ondrej Bilka [Tue, 11 Jun 2013 06:54:35 +0000 (08:54 +0200)]
Fix-trailing-whitespaces-in-libidn.

11 years agoFix symbol definitions for __clock_* functions
Siddhesh Poyarekar [Tue, 11 Jun 2013 05:41:11 +0000 (11:11 +0530)]
Fix symbol definitions for __clock_* functions

__clock_gettime and other __clock_* functions could result in an extra
PLT reference within libc.so if it actually gets used.  None of the
code currently uses them, which is why this probably went unnoticed.

11 years agoRemove trailing whitespace from mach/*.sub.
Joseph Myers [Mon, 10 Jun 2013 22:47:08 +0000 (22:47 +0000)]
Remove trailing whitespace from mach/*.sub.

11 years agox86*: Return syscall error for lll_futex_wake.
Carlos O'Donell [Mon, 10 Jun 2013 16:05:11 +0000 (12:05 -0400)]
x86*: Return syscall error for lll_futex_wake.

It is very very possible that the futex syscall returns an
error and that the caller of lll_futex_wake may want to
look at that error and propagate the failure.

This patch allows a caller to see the syscall error.

There are no users of the syscall error at present, but
future cleanups are now be able to check for the error.

--

nplt/

2013-06-10  Carlos O'Donell  <carlos@redhat.com>

* sysdeps/unix/sysv/linux/i386/lowlevellock.h
(lll_futex_wake): Return syscall error.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
(lll_futex_wake): Return syscall error.

11 years agoAdd rounding mode information to math-tests.h and use it in libm-test.inc.
Joseph Myers [Mon, 10 Jun 2013 12:34:49 +0000 (12:34 +0000)]
Add rounding mode information to math-tests.h and use it in libm-test.inc.

11 years agoAvoid overwriting earlier flags in CPPFLAGS-nonlib in benchtests
Siddhesh Poyarekar [Mon, 10 Jun 2013 04:38:46 +0000 (10:08 +0530)]
Avoid overwriting earlier flags in CPPFLAGS-nonlib in benchtests

When setting BENCH_DURATION in CPPFLAGS-nonlib, append to the variable
instead of assigning to it, to avoid overwriting earlier set flags,
notably the -DNOT_IN_libc=1 flag.

11 years agoFix previous commit.
Ondrej Bilka [Sat, 8 Jun 2013 20:50:29 +0000 (22:50 +0200)]
Fix previous commit.

11 years agoSilence warning: __inline is not at beginning of declaration.
Ondrej Bilka [Sat, 8 Jun 2013 18:03:24 +0000 (20:03 +0200)]
Silence warning: __inline is not at beginning of declaration.

11 years agoAvoid trailing whitespace in sysdeps/gnu/errlist.c.
Joseph Myers [Sat, 8 Jun 2013 14:55:32 +0000 (14:55 +0000)]
Avoid trailing whitespace in sysdeps/gnu/errlist.c.

11 years agoUse (void) in no-arguments function definitions.
Joseph Myers [Sat, 8 Jun 2013 00:22:23 +0000 (00:22 +0000)]
Use (void) in no-arguments function definitions.

11 years agoAvoid use of "register" as optimization hint.
Joseph Myers [Fri, 7 Jun 2013 22:24:35 +0000 (22:24 +0000)]
Avoid use of "register" as optimization hint.

11 years agoRemove trailing whitespace from localedata.
Joseph Myers [Fri, 7 Jun 2013 14:56:03 +0000 (14:56 +0000)]
Remove trailing whitespace from localedata.

11 years agoUpdate miscellaneous scripts from upstream.
Joseph Myers [Thu, 6 Jun 2013 19:02:09 +0000 (19:02 +0000)]
Update miscellaneous scripts from upstream.

11 years agoFix leading whitespaces.
Ondrej Bilka [Thu, 6 Jun 2013 17:36:03 +0000 (19:36 +0200)]
Fix leading whitespaces.

11 years agoFix ChangeLog.
Ondrej Bilka [Thu, 6 Jun 2013 14:11:10 +0000 (16:11 +0200)]
Fix ChangeLog.

11 years agoRemove trailing whitespace in nptl.
Joseph Myers [Thu, 6 Jun 2013 12:06:15 +0000 (12:06 +0000)]
Remove trailing whitespace in nptl.

11 years agoBZ #15583: r7 uninitialized in strcpy.S when ARM_HAS_T2 undefined
Richard Henderson [Wed, 5 Jun 2013 22:44:52 +0000 (15:44 -0700)]
BZ #15583: r7 uninitialized in strcpy.S when ARM_HAS_T2 undefined

11 years agoFix executable mode.
Ondrej Bilka [Thu, 6 Jun 2013 00:14:27 +0000 (02:14 +0200)]
Fix executable mode.

11 years agoRemove trailing whitespace.
Joseph Myers [Wed, 5 Jun 2013 20:44:03 +0000 (20:44 +0000)]
Remove trailing whitespace.

11 years agoRemove trailing whitespace in ports.
Joseph Myers [Wed, 5 Jun 2013 20:26:40 +0000 (20:26 +0000)]
Remove trailing whitespace in ports.

11 years agoAdd #include <stdint.h> to locale/gen-translit.pl and fix C-translit.h.
Ryan S. Arnold [Wed, 5 Jun 2013 15:28:33 +0000 (10:28 -0500)]
Add #include <stdint.h> to locale/gen-translit.pl and fix C-translit.h.

11 years agoProperly handle %W in strptime
Andreas Schwab [Tue, 5 Feb 2013 13:40:39 +0000 (14:40 +0100)]
Properly handle %W in strptime

11 years agoSkip modifying exception mask and flags in SET_RESTORE_ROUND_53BIT
Siddhesh Poyarekar [Wed, 5 Jun 2013 08:26:19 +0000 (13:56 +0530)]
Skip modifying exception mask and flags in SET_RESTORE_ROUND_53BIT

We only need to set/restore rounding mode to ensure correct
computation for non-default rounding modes.

11 years agoAdd copyright header to test-strchrnul.c
Siddhesh Poyarekar [Tue, 4 Jun 2013 11:10:55 +0000 (16:40 +0530)]
Add copyright header to test-strchrnul.c

11 years ago[AArch64] Ensure getcontext() initializes PSTATE.
Marcus Shawcroft [Tue, 4 Jun 2013 09:05:08 +0000 (10:05 +0100)]
[AArch64] Ensure getcontext() initializes PSTATE.

11 years agoIncrease test case timeout
Siddhesh Poyarekar [Tue, 4 Jun 2013 05:53:54 +0000 (11:23 +0530)]
Increase test case timeout

11 years agoBZ #15536: Fix ulp for 128-bit IBM long double.
Carlos O'Donell [Mon, 3 Jun 2013 18:49:48 +0000 (14:49 -0400)]
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.

11 years agoRevert po and pot files changes.
Carlos O'Donell [Fri, 31 May 2013 17:04:33 +0000 (13:04 -0400)]
Revert po and pot files changes.

Upstream TP should modify PO files and POT file
should be empty template.

11 years agoLink extra-libs consistently with libc and ld.so.
Joseph Myers [Fri, 31 May 2013 16:16:33 +0000 (16:16 +0000)]
Link extra-libs consistently with libc and ld.so.

11 years agoSet reasonable limits for xdr_requests.
Patsy Franklin [Thu, 30 May 2013 21:05:21 +0000 (17:05 -0400)]
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.

11 years ago [BZ #14256]
Jeff Law [Thu, 23 May 2013 19:28:00 +0000 (13:28 -0600)]
   [BZ #14256]
        * manual/errno.texi (ESTALE): Update to account for more than
        just NFS file systems.
        * sysdeps/gnu/errlist.c: Regenerated.

11 years agoAvoid crashing in LD_DEBUG when program name is unavailable
Siddhesh Poyarekar [Wed, 29 May 2013 16:00:20 +0000 (21:30 +0530)]
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.

11 years agoFix ChangeLog formatting
Siddhesh Poyarekar [Wed, 29 May 2013 15:55:06 +0000 (21:25 +0530)]
Fix ChangeLog formatting

11 years agoAdd descriptive titles to po files and header.
Carlos O'Donell [Wed, 29 May 2013 03:52:15 +0000 (23:52 -0400)]
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.

11 years agolocaledef: include file name in error messages
Mike Frysinger [Sat, 25 May 2013 18:38:38 +0000 (14:38 -0400)]
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>
11 years agoDoc fix for 'frexp' in arith.texi
Ben Norht [Tue, 28 May 2013 21:20:24 +0000 (17:20 -0400)]
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.

11 years agoUpdate powerpc libm-test ULPs.
Adhemerval Zanella [Tue, 28 May 2013 13:39:00 +0000 (08:39 -0500)]
Update powerpc libm-test ULPs.

11 years ago * stdio-common/bug26.c (main): Correct fscanf template.
Thomas Schwinge [Sun, 26 May 2013 19:59:24 +0000 (21:59 +0200)]
* stdio-common/bug26.c (main): Correct fscanf template.

Fixup for commit 6ecec3b616aeaf121c68c1053cd17fdcf0cdb5a2.

11 years ago_dl_skip_args declaration cleanup.
Thomas Schwinge [Sun, 26 May 2013 17:48:25 +0000 (19:48 +0200)]
_dl_skip_args declaration cleanup.

* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start:go): Don't
declare _dl_skip_args.

Continuation of commit 8347c74cc5c972aa9e57747177b1f5f4b1cbcac8.

11 years ago_dl_non_dynamic_init declaration cleanup.
Thomas Schwinge [Sun, 26 May 2013 16:53:19 +0000 (18:53 +0200)]
_dl_non_dynamic_init declaration cleanup.

* sysdeps/mach/hurd/i386/init-first.c (_dl_non_dynamic_init):
Don't declare.

Continuation of commit bc16e260d0e74b36e48d30edc6ea4f1152700c09.

11 years ago * manual/platform.texi: Add missing @end deftypefun.
Thomas Schwinge [Sun, 26 May 2013 16:06:30 +0000 (18:06 +0200)]
* manual/platform.texi: Add missing @end deftypefun.

Fixup for commit d116b7c414c8239b677e341ac517745db689ac2d.

11 years agoFix ldbl-96 hypotl of subnormals (bug 15529).
Joseph Myers [Fri, 24 May 2013 20:52:55 +0000 (20:52 +0000)]
Fix ldbl-96 hypotl of subnormals (bug 15529).

11 years agoTest drem and pow10 in libm-test.inc.
Joseph Myers [Fri, 24 May 2013 20:33:14 +0000 (20:33 +0000)]
Test drem and pow10 in libm-test.inc.

11 years agoAdd bug 14894 to NEWS.
Joseph Myers [Fri, 24 May 2013 20:30:36 +0000 (20:30 +0000)]
Add bug 14894 to NEWS.

11 years agoUse same tests for isfinite/finite, lgamma/gamma.
Joseph Myers [Fri, 24 May 2013 19:21:22 +0000 (19:21 +0000)]
Use same tests for isfinite/finite, lgamma/gamma.

11 years agoPowerPC: Program Priority Register support
Adhemerval Zanella [Fri, 24 May 2013 18:29:30 +0000 (13:29 -0500)]
PowerPC: Program Priority Register support

This patch add inline functions to change the Program Priority Register
from ISA 2.05.

11 years agoCorrectly compute ulp near zero.
Carlos O'Donell [Fri, 24 May 2013 18:03:14 +0000 (14:03 -0400)]
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.

11 years agotile: improve detection for missing -mcmodel=large support
Chris Metcalf [Fri, 24 May 2013 18:02:31 +0000 (14:02 -0400)]
tile: improve detection for missing -mcmodel=large support

The existing test avoided passing -mcmodel=large if the compiler didn't
support it.  However, we need to test not just the compiler support, but
also the toolchain (as and ld) support, so make the test more complete.
In addition, we have to avoid using the hwN_plt() assembly operators if
that support is missing, so guard the uses with #ifdef NO_PLT_PCREL.

This allows us to properly build glibc with the current community
binutils, which doesn't yet have the PC-relative PLT operator support.
The -mcmodel=large support is in gcc 4.8, but the toolchain support
won't be present in the community until binutils 2.24.

11 years agoRemove libm-test START_DATA and END_DATA.
Joseph Myers [Fri, 24 May 2013 13:10:42 +0000 (13:10 +0000)]
Remove libm-test START_DATA and END_DATA.

11 years agoMake libm-test START and END into ordinary macros.
Joseph Myers [Fri, 24 May 2013 12:22:04 +0000 (12:22 +0000)]
Make libm-test START and END into ordinary macros.

11 years agoInitialize wide struct info.
Ondrej Bilka [Fri, 24 May 2013 06:34:10 +0000 (08:34 +0200)]
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.

11 years agoAdd BZ # to ChangeLog for commit 9323d39baea2fb0cca3735136abe263eff405133
Ryan S. Arnold [Thu, 23 May 2013 15:39:05 +0000 (10:39 -0500)]
Add BZ # to ChangeLog for commit 9323d39baea2fb0cca3735136abe263eff405133

11 years agoPowerPC: Add functions for shared resources hints.
Edjunior Machado [Thu, 23 May 2013 15:06:24 +0000 (10:06 -0500)]
PowerPC: Add functions for shared resources hints.

11 years ago[AArch64] Fix up ChangeLog formatting for last commit.
Marcus Shawcroft [Thu, 23 May 2013 15:08:49 +0000 (16:08 +0100)]
[AArch64] Fix up ChangeLog formatting for last commit.

11 years ago[AArch64] Use generic "mcount" routine for profiling.
Marcus Shawcroft [Thu, 23 May 2013 13:47:15 +0000 (14:47 +0100)]
[AArch64] Use generic "mcount" routine for profiling.

11 years agoUpdate comments in ldconfig.c and dl-hwcaps.c.
Carlos O'Donell [Thu, 23 May 2013 03:22:36 +0000 (23:22 -0400)]
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.

11 years agoDon't include function names in test data in generated libm-test.c.
Joseph Myers [Wed, 22 May 2013 21:01:44 +0000 (21:01 +0000)]
Don't include function names in test data in generated libm-test.c.

11 years agoUpdate bits/siginfo.h with Linux hwpoison SIGBUS changes
Edjunior Barbosa Machado [Wed, 22 May 2013 19:19:49 +0000 (14:19 -0500)]
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.

11 years agoFix _nl_find_msg malloc failure case, and callers.
Carlos O'Donell [Wed, 22 May 2013 18:50:26 +0000 (14:50 -0400)]
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 006dd86111c44572dbd3b26e9c63dd0f834d7762 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.

11 years agoDon't include expected results in libm-test test names.
Joseph Myers [Wed, 22 May 2013 11:49:36 +0000 (11:49 +0000)]
Don't include expected results in libm-test test names.

11 years agoSort benchmark functions
Siddhesh Poyarekar [Wed, 22 May 2013 05:35:04 +0000 (11:05 +0530)]
Sort benchmark functions

11 years agoAdd benchmark inputs for math functions
Siddhesh Poyarekar [Tue, 23 Apr 2013 10:59:07 +0000 (16:29 +0530)]
Add benchmark inputs for math functions

Add benchmark inputs for inverse and hyperbolic trigonometric
functions and log.

11 years agoFix MIPS n32 cancellation in static libc (bug 15506).
Joseph Myers [Tue, 21 May 2013 20:27:45 +0000 (20:27 +0000)]
Fix MIPS n32 cancellation in static libc (bug 15506).

11 years agoTest getaddrinfo return value
Dmitry V. Levin [Thu, 16 May 2013 21:55:09 +0000 (21:55 +0000)]
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.

11 years agoSet EAI_SYSTEM only when h_errno is NETDB_INTERNAL
Siddhesh Poyarekar [Tue, 21 May 2013 16:24:41 +0000 (21:54 +0530)]
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.

11 years agoFix parsing of numeric hosts in gethostbyname_r
Andreas Schwab [Mon, 21 Jan 2013 16:41:28 +0000 (17:41 +0100)]
Fix parsing of numeric hosts in gethostbyname_r

11 years agoAdd a README for benchtests
Siddhesh Poyarekar [Tue, 21 May 2013 09:29:50 +0000 (14:59 +0530)]
Add a README for benchtests

Move instructions from the Makefile here and expand on them.

11 years agoAArch64: Don't clobber argument for tail call to __sigjmp_save in sigsetjmp
Andreas Schwab [Mon, 20 May 2013 08:19:31 +0000 (10:19 +0200)]
AArch64: Don't clobber argument for tail call to __sigjmp_save in sigsetjmp

11 years ago[AArch64] Update libm-test-ulps.
Marcus Shawcroft [Tue, 21 May 2013 08:01:19 +0000 (09:01 +0100)]
[AArch64] Update libm-test-ulps.

11 years agoPowerPC: update missing CL/NEWS bug reference
Adhemerval Zanella [Mon, 20 May 2013 14:35:01 +0000 (09:35 -0500)]
PowerPC: update missing CL/NEWS bug reference

Update ChangLog bugzilla number and NEWS for commit
13d3b41a36c4f28d171a144f8a9baad3a8835981 (PowerPC: fix hypot/hypotf
check for -INF).

11 years agoFaster memset on x64
Ondrej Bilka [Mon, 20 May 2013 06:26:00 +0000 (08:26 +0200)]
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

11 years agoFaster memcpy on x64.
Ondrej Bilka [Mon, 20 May 2013 06:20:00 +0000 (08:20 +0200)]
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

11 years agoFix nearbyint scheduling of arithmetic past fesetenv (bug 15490).
Joseph Myers [Sun, 19 May 2013 18:40:25 +0000 (18:40 +0000)]
Fix nearbyint scheduling of arithmetic past fesetenv (bug 15490).

11 years agoHandle sincos with generic libm-test logic.
Joseph Myers [Sun, 19 May 2013 14:45:41 +0000 (14:45 +0000)]
Handle sincos with generic libm-test logic.

11 years agoSimplify gen-libm-test.pl handling of tests with extra outputs.
Joseph Myers [Sun, 19 May 2013 14:40:40 +0000 (14:40 +0000)]
Simplify gen-libm-test.pl handling of tests with extra outputs.

11 years agoDon't disable CMPLXL macro for __NO_LONG_DOUBLE_MATH (bug 15488).
Joseph Myers [Sat, 18 May 2013 12:12:38 +0000 (12:12 +0000)]
Don't disable CMPLXL macro for __NO_LONG_DOUBLE_MATH (bug 15488).

11 years agoMake libm-test look up ulps by name at runtime.
Joseph Myers [Sat, 18 May 2013 12:10:59 +0000 (12:10 +0000)]
Make libm-test look up ulps by name at runtime.

11 years agoFix remainder exceptions and directed-rounding results (bugs 15480, 15485).
Joseph Myers [Fri, 17 May 2013 19:04:08 +0000 (19:04 +0000)]
Fix remainder exceptions and directed-rounding results (bugs 15480, 15485).

11 years agoSimplify libm-test extra-output initialization.
Joseph Myers [Fri, 17 May 2013 19:02:19 +0000 (19:02 +0000)]
Simplify libm-test extra-output initialization.