Joseph Myers [Fri, 14 Jun 2013 20:21:40 +0000 (20:21 +0000)]
Add math-tests.h for MIPS.
Liubov Dmitrieva [Fri, 14 Jun 2013 18:46:15 +0000 (20:46 +0200)]
Set fast unaligned load flag for new Intel microarchitecture
I have small patch for new Intel Silvermont machines.
http://newsroom.intel.com/community/intel_newsroom/blog/2013/05/06/intel-launches-low-power-high-performance-silvermont-microarchitecture
I checked this on my machine and see that strcpy, ... unaligned
versions are faster than ssse3 versions.
Siddhesh Poyarekar [Fri, 14 Jun 2013 18:39:26 +0000 (00:09 +0530)]
Add rtld-memset.S for x86_64
Resolves: BZ #15627
Add an assembler version of rtld-memset to avoid using SSE registers.
Joseph Myers [Fri, 14 Jun 2013 17:58:41 +0000 (17:58 +0000)]
Make tst-strtod-round use ROUNDING_TESTS.
Kirk Meyer [Fri, 14 Jun 2013 00:11:02 +0000 (10:11 +1000)]
MicroBlaze: negated errors in lowlevellock.h
The macros in lowlevellock.h are returning positive errors, but the
users of the macros expect negative. This causes e.g. sem_wait to
sometimes return an error with errno set to -EWOULDBLOCK.
Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com>
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Roland McGrath [Thu, 13 Jun 2013 22:09:29 +0000 (15:09 -0700)]
Fix raciness in waitid test.
Siddhesh Poyarekar [Thu, 13 Jun 2013 19:50:06 +0000 (01:20 +0530)]
Avoid access beyond memory bounds in pthread_attr_getaffinity_np
Resolves BZ #15618.
pthread_attr_getaffinity_np may write beyond bounds of the input
cpuset buffer if the size of the input buffer is smaller than the
buffer present in the input pthread attributes. Fix is to copy to the
extent of the minimum of the source and the destination.
Siddhesh Poyarekar [Thu, 13 Jun 2013 17:42:00 +0000 (23:12 +0530)]
Fix NEWS entry about clock precision
Text by Roland McGrath.
Roland McGrath [Thu, 13 Jun 2013 17:26:44 +0000 (10:26 -0700)]
Don't let ld.so that failed its sanity check land in place.
Chris Metcalf [Wed, 12 Jun 2013 20:48:33 +0000 (16:48 -0400)]
tile: default to little-endian in bits/endian.h
This turns out to be helpful when doing a from-scratch cross-compile of
gcc and glibc, since you can then do "make install-headers" in glibc
even before you have a functioning tile gcc.
Joseph Myers [Thu, 13 Jun 2013 15:41:58 +0000 (15:41 +0000)]
Rework tst-strtod-round handling of inexact results.
Andreas Jaeger [Thu, 13 Jun 2013 07:52:49 +0000 (09:52 +0200)]
Fix formatting of comment
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.
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.
Siddhesh Poyarekar [Thu, 13 Jun 2013 04:49:49 +0000 (10:19 +0530)]
Fix ChangeLog entry
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.
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.
Joseph Myers [Wed, 12 Jun 2013 12:41:25 +0000 (12:41 +0000)]
Make more libm tests condition exceptions tests with math-tests.h.
Andreas Jaeger [Wed, 12 Jun 2013 08:12:19 +0000 (10:12 +0200)]
Update Interlingua translation from translation project
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.
Siddhesh Poyarekar [Tue, 11 Jun 2013 16:44:43 +0000 (22:14 +0530)]
Convert iso-639.def to utf-8
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.
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.
Ryan S. Arnold [Tue, 11 Jun 2013 14:33:33 +0000 (09:33 -0500)]
PowerPC: Remove redundant ports/sysdeps/powerpc/dl-procinfo.[ch].
Ryan S. Arnold [Tue, 11 Jun 2013 14:32:41 +0000 (09:32 -0500)]
PowerPC: Merge ports/ dl-procinfo.[ch] with base.
Andreas Schwab [Thu, 10 Jan 2013 16:46:49 +0000 (17:46 +0100)]
Update BIG5-HKSCS charmap to HKSCS-2008
Siddhesh Poyarekar [Tue, 11 Jun 2013 13:12:42 +0000 (18:42 +0530)]
Fix indentation and add copyright header to time.h
Siddhesh Poyarekar [Tue, 4 Jun 2013 12:41:43 +0000 (18:11 +0530)]
Remove performance-related bits from string tests
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.
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-*.
Andreas Schwab [Mon, 10 Jun 2013 12:39:09 +0000 (14:39 +0200)]
Fix handling of netgroup cache in nscd
Andreas Jaeger [Tue, 11 Jun 2013 06:49:00 +0000 (08:49 +0200)]
Update Chinese (traditional) translation from translation project
Ondrej Bilka [Tue, 11 Jun 2013 06:54:35 +0000 (08:54 +0200)]
Fix-trailing-whitespaces-in-libidn.
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.
Joseph Myers [Mon, 10 Jun 2013 22:47:08 +0000 (22:47 +0000)]
Remove trailing whitespace from mach/*.sub.
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.
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.
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.
Ondrej Bilka [Sat, 8 Jun 2013 20:50:29 +0000 (22:50 +0200)]
Fix previous commit.
Ondrej Bilka [Sat, 8 Jun 2013 18:03:24 +0000 (20:03 +0200)]
Silence warning: __inline is not at beginning of declaration.
Joseph Myers [Sat, 8 Jun 2013 14:55:32 +0000 (14:55 +0000)]
Avoid trailing whitespace in sysdeps/gnu/errlist.c.
Joseph Myers [Sat, 8 Jun 2013 00:22:23 +0000 (00:22 +0000)]
Use (void) in no-arguments function definitions.
Joseph Myers [Fri, 7 Jun 2013 22:24:35 +0000 (22:24 +0000)]
Avoid use of "register" as optimization hint.
Joseph Myers [Fri, 7 Jun 2013 14:56:03 +0000 (14:56 +0000)]
Remove trailing whitespace from localedata.
Joseph Myers [Thu, 6 Jun 2013 19:02:09 +0000 (19:02 +0000)]
Update miscellaneous scripts from upstream.
Ondrej Bilka [Thu, 6 Jun 2013 17:36:03 +0000 (19:36 +0200)]
Fix leading whitespaces.
Ondrej Bilka [Thu, 6 Jun 2013 14:11:10 +0000 (16:11 +0200)]
Fix ChangeLog.
Joseph Myers [Thu, 6 Jun 2013 12:06:15 +0000 (12:06 +0000)]
Remove trailing whitespace in nptl.
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
Ondrej Bilka [Thu, 6 Jun 2013 00:14:27 +0000 (02:14 +0200)]
Fix executable mode.
Joseph Myers [Wed, 5 Jun 2013 20:44:03 +0000 (20:44 +0000)]
Remove trailing whitespace.
Joseph Myers [Wed, 5 Jun 2013 20:26:40 +0000 (20:26 +0000)]
Remove trailing whitespace in ports.
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.
Andreas Schwab [Tue, 5 Feb 2013 13:40:39 +0000 (14:40 +0100)]
Properly handle %W in strptime
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.
Siddhesh Poyarekar [Tue, 4 Jun 2013 11:10:55 +0000 (16:40 +0530)]
Add copyright header to test-strchrnul.c
Marcus Shawcroft [Tue, 4 Jun 2013 09:05:08 +0000 (10:05 +0100)]
[AArch64] Ensure getcontext() initializes PSTATE.
Siddhesh Poyarekar [Tue, 4 Jun 2013 05:53:54 +0000 (11:23 +0530)]
Increase test case timeout
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.
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.
Joseph Myers [Fri, 31 May 2013 16:16:33 +0000 (16:16 +0000)]
Link extra-libs consistently with libc and ld.so.
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.
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.
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.
Siddhesh Poyarekar [Wed, 29 May 2013 15:55:06 +0000 (21:25 +0530)]
Fix ChangeLog formatting
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.
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>
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.
Adhemerval Zanella [Tue, 28 May 2013 13:39:00 +0000 (08:39 -0500)]
Update powerpc libm-test ULPs.
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.
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.
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.
Thomas Schwinge [Sun, 26 May 2013 16:06:30 +0000 (18:06 +0200)]
* manual/platform.texi: Add missing @end deftypefun.
Fixup for commit
d116b7c414c8239b677e341ac517745db689ac2d.
Joseph Myers [Fri, 24 May 2013 20:52:55 +0000 (20:52 +0000)]
Fix ldbl-96 hypotl of subnormals (bug 15529).
Joseph Myers [Fri, 24 May 2013 20:33:14 +0000 (20:33 +0000)]
Test drem and pow10 in libm-test.inc.
Joseph Myers [Fri, 24 May 2013 20:30:36 +0000 (20:30 +0000)]
Add bug 14894 to NEWS.
Joseph Myers [Fri, 24 May 2013 19:21:22 +0000 (19:21 +0000)]
Use same tests for isfinite/finite, lgamma/gamma.
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.
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.
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.
Joseph Myers [Fri, 24 May 2013 13:10:42 +0000 (13:10 +0000)]
Remove libm-test START_DATA and END_DATA.
Joseph Myers [Fri, 24 May 2013 12:22:04 +0000 (12:22 +0000)]
Make libm-test START and END into ordinary macros.
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.
Ryan S. Arnold [Thu, 23 May 2013 15:39:05 +0000 (10:39 -0500)]
Edjunior Machado [Thu, 23 May 2013 15:06:24 +0000 (10:06 -0500)]
PowerPC: Add functions for shared resources hints.
Marcus Shawcroft [Thu, 23 May 2013 15:08:49 +0000 (16:08 +0100)]
[AArch64] Fix up ChangeLog formatting for last commit.
Marcus Shawcroft [Thu, 23 May 2013 13:47:15 +0000 (14:47 +0100)]
[AArch64] Use generic "mcount" routine for profiling.
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.
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.
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.
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.
Joseph Myers [Wed, 22 May 2013 11:49:36 +0000 (11:49 +0000)]
Don't include expected results in libm-test test names.
Siddhesh Poyarekar [Wed, 22 May 2013 05:35:04 +0000 (11:05 +0530)]
Sort benchmark 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.
Joseph Myers [Tue, 21 May 2013 20:27:45 +0000 (20:27 +0000)]
Fix MIPS n32 cancellation in static libc (bug 15506).
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.
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.
Andreas Schwab [Mon, 21 Jan 2013 16:41:28 +0000 (17:41 +0100)]
Fix parsing of numeric hosts in gethostbyname_r
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.
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