]> git.ipfire.org Git - thirdparty/glibc.git/log
thirdparty/glibc.git
8 years agoOpen development for 2.24. glibc-2.23.90
Adhemerval Zanella [Thu, 18 Feb 2016 18:11:58 +0000 (16:11 -0200)] 
Open development for 2.24.

8 years agoUpdate version.h and include/features.h for 2.23 release glibc-2.23
Adhemerval Zanella [Thu, 18 Feb 2016 17:54:00 +0000 (15:54 -0200)] 
Update version.h and include/features.h for 2.23 release

8 years agoUpdate NEWS with fixed bugs for 2.23 release
Adhemerval Zanella [Thu, 18 Feb 2016 17:51:45 +0000 (15:51 -0200)] 
Update NEWS with fixed bugs for 2.23 release

8 years agoAdd _STRING_INLINE_unaligned and string_private.h
H.J. Lu [Thu, 18 Feb 2016 13:00:33 +0000 (11:00 -0200)] 
Add _STRING_INLINE_unaligned and string_private.h

As discussed in

https://sourceware.org/ml/libc-alpha/2015-10/msg00403.html

the setting of _STRING_ARCH_unaligned currently controls the external
GLIBC ABI as well as selecting the use of unaligned accesses withing
GLIBC.

Since _STRING_ARCH_unaligned was recently changed for AArch64, this
would potentially break the ABI in GLIBC 2.23, so split the uses and add
_STRING_INLINE_unaligned to select the string ABI. This setting must be
fixed for each target, while _STRING_ARCH_unaligned may be changed from
release to release.  _STRING_ARCH_unaligned is used unconditionally in
glibc.  But <bits/string.h>, which defines _STRING_ARCH_unaligned, isn't
included with -Os.  Since _STRING_ARCH_unaligned is internal to glibc and
may change between glibc releases, it should be made private to glibc.
_STRING_ARCH_unaligned should defined in the new string_private.h heade
file which is included unconditionally from internal <string.h> for glibc
build.

[BZ #19462]
* bits/string.h (_STRING_ARCH_unaligned): Renamed to ...
(_STRING_INLINE_unaligned): This.
* include/string.h: Include <string_private.h>.
* string/bits/string2.h: Replace _STRING_ARCH_unaligned with
_STRING_INLINE_unaligned.
* sysdeps/aarch64/bits/string.h (_STRING_ARCH_unaligned): Removed.
(_STRING_INLINE_unaligned): New.
* sysdeps/aarch64/string_private.h: New file.
* sysdeps/generic/string_private.h: Likewise.
* sysdeps/m68k/m680x0/m68020/string_private.h: Likewise.
* sysdeps/s390/string_private.h: Likewise.
* sysdeps/x86/string_private.h: Likewise.
* sysdeps/m68k/m680x0/m68020/bits/string.h
(_STRING_ARCH_unaligned): Renamed to ...
(_STRING_INLINE_unaligned): This.
* sysdeps/s390/bits/string.h (_STRING_ARCH_unaligned): Renamed
to ...
(_STRING_INLINE_unaligned): This.
* sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Renamed
to ...
(_STRING_INLINE_unaligned): This.
* sysdeps/x86/bits/string.h (_STRING_ARCH_unaligned): Renamed
to ...
(_STRING_INLINE_unaligned): This.

8 years agoNEWS: List additional fixed security bugs
Florian Weimer [Thu, 18 Feb 2016 14:10:11 +0000 (15:10 +0100)] 
NEWS: List additional fixed security bugs

8 years agoUse PIC relocation in ALIAS_IMPL
Andrew Senkevich [Wed, 17 Feb 2016 22:23:32 +0000 (14:23 -0800)] 
Use PIC relocation in ALIAS_IMPL

Since libmvec_nonshared.a may be linked into shared objects, ALIAS_IMPL
should use PIC relocation.

[BZ #19590]
* sysdeps/x86_64/fpu/svml_finite_alias.S (ALIAS_IMPL): Use PIC
relocation.

8 years agoCVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug 18665).
Carlos O'Donell [Wed, 17 Feb 2016 02:26:37 +0000 (21:26 -0500)] 
CVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug 18665).

* A stack-based buffer overflow was found in libresolv when invoked from
  libnss_dns, allowing specially crafted DNS responses to seize control
  of execution flow in the DNS client.  The buffer overflow occurs in
  the functions send_dg (send datagram) and send_vc (send TCP) for the
  NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC
  family.  The use of AF_UNSPEC triggers the low-level resolver code to
  send out two parallel queries for A and AAAA.  A mismanagement of the
  buffers used for those queries could result in the response of a query
  writing beyond the alloca allocated buffer created by
  _nss_dns_gethostbyname4_r.  Buffer management is simplified to remove
  the overflow.  Thanks to the Google Security Team and Red Hat for
  reporting the security impact of this issue, and Robert Holiday of
  Ciena for reporting the related bug 18665. (CVE-2015-7547)

See also:
https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html
https://sourceware.org/ml/libc-alpha/2016-02/msg00418.html

8 years agoUpdate INSTALL with latest versions tested to work.
Carlos O'Donell [Mon, 15 Feb 2016 01:54:29 +0000 (20:54 -0500)] 
Update INSTALL with latest versions tested to work.

8 years agoEnsure isinff, isinfl, isnanf, and isnanl are defined (Bug 19439)
Carlos O'Donell [Mon, 15 Feb 2016 00:27:06 +0000 (19:27 -0500)] 
Ensure isinff, isinfl, isnanf, and isnanl are defined (Bug 19439)

In ICO C++11 mode ensure that isinff, isinfl, isnanf, and isnanl
are defined.  These functions were accidentally removed from the
header as part of commit d9b965fa56350d6eea9f7f438a0714c7ffbb183f,
but being GNU extensions, they should have been left in place.

8 years agoRevert "ChangeLogs: convert to utf-8"
Mike Frysinger [Fri, 12 Feb 2016 21:34:16 +0000 (16:34 -0500)] 
Revert "ChangeLogs: convert to utf-8"

This reverts commit d2bb040b2a2f58b1ef80f01292bd722fce01d36a.

It seems some files (like tst-regex) directly parse these and rely on
some of its content *not* being UTF-8.  Until we can fix thoses tests
(and isolate them from ChangeLog updates), back out this change.

It also shouldn't really have landed during the freeze.

8 years agohsearch_r: Apply VM size limit in test case
Florian Weimer [Fri, 12 Feb 2016 11:57:40 +0000 (12:57 +0100)] 
hsearch_r: Apply VM size limit in test case

8 years ago[ARM] add missing -funwind-tables to test case (bug 19529)
Szabolcs Nagy [Thu, 11 Feb 2016 17:17:38 +0000 (17:17 +0000)] 
[ARM] add missing -funwind-tables to test case (bug 19529)

stdlib/tst-makecontext test failed on arm because it used backtrace
without -funwind-tables.

8 years agoChangeLogs: convert to utf-8
Paul Eggert [Fri, 22 May 2015 21:42:12 +0000 (14:42 -0700)] 
ChangeLogs: convert to utf-8

8 years agolocaledata: convert all files to utf-8
Mike Frysinger [Mon, 8 Feb 2016 22:17:23 +0000 (17:17 -0500)] 
localedata: convert all files to utf-8

The comments were using various encodings like ISO-8859-1.
Convert them all over to UTF-8.

8 years agopowerpc: Regenerate libm-test-ulps
Rajalakshmi Srinivasaraghavan [Thu, 28 Jan 2016 07:26:59 +0000 (01:26 -0600)] 
powerpc: Regenerate libm-test-ulps

8 years agoFix MIPS mmap negative offset handling for consistency (bug 19550).
Joseph Myers [Mon, 1 Feb 2016 18:20:21 +0000 (18:20 +0000)] 
Fix MIPS mmap negative offset handling for consistency (bug 19550).

The handling of negative offsets in MIPS mmap is inconsistent with
other architectures, as shown by failure of the test
posix/tst-mmap-offset for o32 and n32.  The MIPS mmap syscall uses a
signed argument and does a signed arithmetic shift on it, whereas the
glibc semantics expected by that test are for the offset to be
considered as a large positive offset.  This patch makes MIPS
consistent with other architectures as far as possible by using the
mmap2 syscall on o32 (#including the generic implementation), and
making mmap not an alias for mmap64 for n32, with a custom
implementation for n32 that zero-extends the offset argument to 64-bit
before calling the mmap syscall.

Tested for MIPS64 (o32, n32, n64).

[BZ #19550]
* sysdeps/unix/sysv/linux/mips/mips32/mmap.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/mmap64.c: Move to ....
* sysdeps/unix/sysv/linux/mips/mips64/n64/mmap64.c: ... here.
* sysdeps/unix/sysv/linux/mips/mips64/n32/mmap.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (mmap64):
New syscall entry.
* sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (mmap):
New syscall entry.
* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (mmap): Remove
syscall entry.

8 years agoRevert "elf/elf.h: Add new 386 and X86_64 relocations from binutils."
Mark Wielaard [Sun, 31 Jan 2016 17:34:27 +0000 (18:34 +0100)] 
Revert "elf/elf.h: Add new 386 and X86_64 relocations from binutils."

This reverts commit 3da75f08818fa3d217e5d566477c7001cb774792.

glibc 2.23 hard freeze doesn't allow this change at this time.

8 years agoelf/elf.h: Add new 386 and X86_64 relocations from binutils.
Mark Wielaard [Fri, 29 Jan 2016 08:49:01 +0000 (09:49 +0100)] 
elf/elf.h: Add new 386 and X86_64 relocations from binutils.

The following new 386 and X86_64 were added to binutils. They are
non-dynamic relocations, so don't need direct handling in glibc.
But other programs, like elfutils, use the glibc elf.h definitions
for the names and numbers when inspecting ET_REL files.

R_386_GOT32X was proposed in
https://groups.google.com/forum/#!topic/ia32-abi/GbJJskkid4I

X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX were proposed in
https://groups.google.com/forum/#!topic/x86-64-abi/n9AWHogmVY0

There also used to be R_X86_64_PC32_BND and R_X86_64_PLT32_BND
but those already got deprecated in
https://groups.google.com/d/msg/x86-64-abi/-hdQyMixt8Y/XFDOvioG85cJ

* elf/elf.h (R_386_GOT32X): New.
(R_386_NUM): Update.
(R_X86_64_GOTPCRELX: New.
(R_X86_64_REX_GOTPCRELX): New.
(R_X86_64_NUM): Update.

8 years agoImprove check against integer wraparound in hcreate_r [BZ #18240]
Florian Weimer [Thu, 28 Jan 2016 12:59:11 +0000 (13:59 +0100)] 
Improve check against integer wraparound in hcreate_r [BZ #18240]

8 years agoFix MIPS64 memcpy regression.
Steve Ellcey [Thu, 28 Jan 2016 01:52:05 +0000 (01:52 +0000)] 
Fix MIPS64 memcpy regression.

The MIPS memcpy optimizations at
<https://sourceware.org/ml/libc-alpha/2015-10/msg00597.html>
introduced a bug causing many string function tests to fail with
segfaults for n32 and n64:

FAIL: string/stratcliff
FAIL: string/test-bcopy
FAIL: string/test-memccpy
FAIL: string/test-memcmp
FAIL: string/test-memcpy
FAIL: string/test-memmove
FAIL: string/test-mempcpy
FAIL: string/test-stpncpy
FAIL: string/test-strncmp
FAIL: string/test-strncpy

(Some failures in other directories could also be caused by this bug.)

The problem is that after the check for whether a word of input is
left that can be copied as a word before moving to byte copies, a load
can occur in the branch delay slot, resulting in a segfault if we are
at the end of a page and the following page is unmapped.  I don't see
how this would have passed the tests as reported in the original patch
posting (different kernel configurations affecting the code setting up
unmapped pages, maybe?), since the tests in question don't appear to
have changed recently.

This patch moves a later instruction into the delay slot, as suggested
at <https://sourceware.org/ml/libc-alpha/2016-01/msg00584.html>.

Tested for n32 and n64.

2016-01-28  Steve Ellcey  <sellcey@imgtec.com>
            Joseph Myers  <joseph@codesourcery.com>

* sysdeps/mips/memcpy.S (MEMCPY_NAME) [USE_DOUBLE]: Avoid word
load in branch delay slot when less than a word of input left.

8 years agoRemove unused variables
Andreas Schwab [Mon, 25 Jan 2016 16:07:07 +0000 (17:07 +0100)] 
Remove unused variables

They are flagged by -Wunused-const-variable.

8 years agoUpdate localplt.data for 32-bit sparc.
David S. Miller [Wed, 27 Jan 2016 00:16:38 +0000 (16:16 -0800)] 
Update localplt.data for 32-bit sparc.

* sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data: Add _Q_cmp.

8 years agoDefine __sqrtl_finite on sparc 32-bit with correct symbol version.
David S. Miller [Tue, 26 Jan 2016 00:07:15 +0000 (16:07 -0800)] 
Define __sqrtl_finite on sparc 32-bit with correct symbol version.

* sysdeps/sparc/sparc32/Versions (GLIBC_2.23): Add entry for __sqrtl_finite.
* sysdeps/sparc/sparc32/fpu/e_sqrtl.c (__sqrtl_finite): Define instead using
versioned_symbol.
* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Fix ordering of entries.

8 years agoAdjust sparc 32-bit __sqrtl_finite version tag.
David S. Miller [Mon, 25 Jan 2016 18:41:05 +0000 (10:41 -0800)] 
Adjust sparc 32-bit __sqrtl_finite version tag.

* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Move
__sqrtl_finite to GLIBC_2.23

8 years agoUpdate Alpha libm-test-ulps
Richard Henderson [Mon, 25 Jan 2016 18:43:41 +0000 (10:43 -0800)] 
Update Alpha libm-test-ulps

8 years agoDon't do lock elision on an error checking mutex (bug 17514)
Andreas Schwab [Wed, 13 Jan 2016 15:04:42 +0000 (16:04 +0100)] 
Don't do lock elision on an error checking mutex (bug 17514)

Error checking mutexes are not supposed to be subject to lock elision.
That would defeat the error checking nature of the mutex because lock
elision doesn't record ownership.

8 years agoCleanup ppc bits/ipc.h
Paul E. Murphy [Tue, 19 Jan 2016 17:05:41 +0000 (11:05 -0600)] 
Cleanup ppc bits/ipc.h

Ages ago (commit e9dcb08) the ipc syscalls were inlined and
eventually abstracted away any need for direct __ipc calls.

8 years agoS390: Fix build failure in test string/tst-endian.c with gcc 6.
Stefan Liebler [Mon, 25 Jan 2016 11:44:46 +0000 (12:44 +0100)] 
S390: Fix build failure in test string/tst-endian.c with gcc 6.

Building string/tst-endian.c with gcc 6 produces an build warning/error on s390 (big endian machine):
gcc tst-endian.c -c -std=gnu11 -fgnu89-inline  -O2 or -O3 ...
tst-endian.c: In function ‘do_test’:
tst-endian.c:16:30: error: self-comparison always evaluates to false [-Werror=tautological-compare]
    if (htobe16 (be16toh (i)) != i)
                              ^~
...

See definitions of htobexx, bexxtoh in string/endian.h:
...

This patch silences these warnings with DIAG_* macros if build with gcc 6
and newer.

The same warnings occur on little endian machines with the
"htoleXX (leXXtoh (i)) != i" if-statements.

ChangeLog:

* string/tst-endian.c: Include <libc-internal.h>.
(do_test): Ignore tautological-compare warnings around
"htobeXX (beXXtoh (i)) != i" and
"htoleXX (leXXtoh (i)) != i" if-statements.

8 years agoFix missing __sqrtl_finite symbol in libm on sparc 32-bit.
David S. Miller [Mon, 25 Jan 2016 05:14:12 +0000 (21:14 -0800)] 
Fix missing __sqrtl_finite symbol in libm on sparc 32-bit.

* sysdeps/sparc/sparc32/fpu/e_sqrtl.c: New file.
* sysdeps/sparc/sparc32/soft-fp/q_sqrt.c (__ieee754_sqrtl): Remove alias.
* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Add __sqrtl_finite.

8 years agoUpdate sparc ULPS.
David S. Miller [Mon, 25 Jan 2016 05:12:58 +0000 (21:12 -0800)] 
Update sparc ULPS.

* sysdeps/sparc/fpu/libm-test-ulps: Update.

8 years agoMIPS: Set the required Linux kernel version to 4.5.0 for 2008 NaN
Maciej W. Rozycki [Mon, 25 Jan 2016 00:19:27 +0000 (00:19 +0000)] 
MIPS: Set the required Linux kernel version to 4.5.0 for 2008 NaN

Complement the addition of the required kernel support, present upstream
as from commit 2b5e869ecfcb3112f7e1267cb0328f3ff6d49b18 ("MIPS: ELF:
Interpret the NAN2008 file header flag") and released with Linux 4.5-rc1
on Jan 24th, 2016.

* sysdeps/unix/sysv/linux/mips/configure.ac: Set
`arch_minimum_kernel' to 4.5.0 if 2008 NaN encoding is used.
* sysdeps/unix/sysv/linux/mips/configure: Regenerate.

8 years agoFix nptl/tst-setuid3.c
Paul E. Murphy [Tue, 19 Jan 2016 19:42:44 +0000 (13:42 -0600)] 
Fix nptl/tst-setuid3.c

pthread_barrier_wait can return either PTHREAD_BARRIER_SERIAL_THREAD
or 0.  Posix makes no guarantees about which thread return the unique
value.

Additionally, pthread_join was not called despite seemingly checking
for the error.

8 years agopowerpc: Fix macro usage of htm builtins
Paul E. Murphy [Wed, 20 Jan 2016 16:33:19 +0000 (10:33 -0600)] 
powerpc: Fix macro usage of htm builtins

Some extraneous semicolons were included in a
recent patch which causes a build failure with
newer compilers.

8 years agoMaintainence patch for nios2: update ULPS file and localplt.data changes.
Chung-Lin Tang [Fri, 22 Jan 2016 06:58:03 +0000 (22:58 -0800)] 
Maintainence patch for nios2: update ULPS file and localplt.data changes.

8 years agoSilence some false positive warnings for gcc 4.7
Chris Metcalf [Wed, 20 Jan 2016 22:07:51 +0000 (17:07 -0500)] 
Silence some false positive warnings for gcc 4.7

8 years agoNaCl: Fix unused variable errors in lowlevellock-futex.h macros.
Roland McGrath [Wed, 20 Jan 2016 21:57:14 +0000 (13:57 -0800)] 
NaCl: Fix unused variable errors in lowlevellock-futex.h macros.

8 years ago2016-01-20 Paul Pluzhnikov <ppluzhnikov@google.com>
Paul Pluzhnikov [Wed, 20 Jan 2016 21:39:20 +0000 (13:39 -0800)] 
2016-01-20  Paul Pluzhnikov  <ppluzhnikov@google.com>

[BZ #19490]
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S (pthread_cond_broadcast): Use ENTRY/END
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S (pthread_cond_signal): Likewise
* sysdeps/x86_64/nptl/pthread_spin_lock.S (pthread_spin_lock): Likewise
* sysdeps/x86_64/nptl/pthread_spin_trylock.S (pthread_spin_trylock): Likewise
* sysdeps/x86_64/nptl/pthread_spin_unlock.S (pthread_spin_unlock): Likewise

8 years agoFix __finitel libm compat symbol version.
Joseph Myers [Wed, 20 Jan 2016 19:04:43 +0000 (19:04 +0000)] 
Fix __finitel libm compat symbol version.

The changes to restrict implementation-namespace symbol aliases such
as __finitel to compat symbols used code for __finitel in libm
analogous to that for __finitel in libc.  However, the versions for
the two symbols are actually different, GLIBC_2.0 in libc and
GLIBC_2.1 in libm.  This patch fixes the handling of the libm compat
symbol.

Tested for mips (o32), where it fixes an ABI test failure.

* sysdeps/ieee754/dbl-64/s_finite.c
[NO_LONG_DOUBLE && LDBL_CLASSIFY_COMPAT] (__finitel): Define
compat symbol at version GLIBC_2_1 and use GLIBC_2_1 in
SHLIB_COMPAT condition for libm, not GLIBC_2_0.
* sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c
[NO_LONG_DOUBLE && LDBL_CLASSIFY_COMPAT] (__finitel): Likewise.

8 years agoUpdate localplt.data for powerpc-nofpu.
Joseph Myers [Wed, 20 Jan 2016 18:19:10 +0000 (18:19 +0000)] 
Update localplt.data for powerpc-nofpu.

Testing for powerpc-nofpu showed that localplt.data was out of date.
Two new soft-fp functions showed up in the list: __gtsf2 and
__unordsf2; this patch adds these as optional.  __signbit and
__signbitl no longer appear as local PLT entries; given the move to
__builtin_signbit* for all GCC versions supported for building glibc
(and given the use of the type-generic signbit macro within glibc),
those can safely be removed from the list, which this patch does.

Tested for powerpc-nofpu.

* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data
(__gtsf2): Add as optional for libc.so.
(__unordsf2): Likewise.
(__signbit): Remove for libc.so.
(__signbitl): Likewise.

8 years agoS390: Fix build error in iconvdata/bug-iconv11.c.
Stefan Liebler [Wed, 20 Jan 2016 07:32:37 +0000 (08:32 +0100)] 
S390: Fix build error in iconvdata/bug-iconv11.c.

This fixes the following build error on S390 31bit while building the test
iconvdata/bug-iconv11.c with gcc 5.3:
bug-iconv11.c: In function ‘test_ibm93x’:
bug-iconv11.c:59:11: error: format ‘%td’ expects argument of type ‘ptrdiff_t’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Werror=format=]
   printf ("  ==> %td: %s\n"
           ^
cc1: all warnings being treated as errors

This patch uses %zu format specifier for argument size_t ret instead of %td.

ChangeLog:

* iconvdata/bug-iconv11.c (test_ibm93x):
Use %zu printf format specifier for size_t argument.

8 years agoFix ulps regeneration for *-finite tests.
Joseph Myers [Tue, 19 Jan 2016 21:42:58 +0000 (21:42 +0000)] 
Fix ulps regeneration for *-finite tests.

On running tests after from-scratch ulps regeneration, I found that
some libm tests failed with ulps in excess of those recorded in the
from-scratch regeneration, which should never happen unless those ulps
exceed the limit on ulps that can go in libm-test-ulps files.

Failure: Test: atan2_upward (inf, -inf)
Result:
 is:          2.35619498e+00   0x1.2d97ccp+1
 should be:   2.35619450e+00   0x1.2d97c8p+1
 difference:  4.76837159e-07   0x1.000000p-21
 ulp       :  2.0000
 max.ulp   :  1.0000
Maximal error of `atan2_upward'
 is      : 2 ulp
 accepted: 1 ulp
Failure: Test: carg_upward (-inf + inf i)
Result:
 is:          2.35619498e+00   0x1.2d97ccp+1
 should be:   2.35619450e+00   0x1.2d97c8p+1
 difference:  4.76837159e-07   0x1.000000p-21
 ulp       :  2.0000
 max.ulp   :  1.0000
Maximal error of `carg_upward'
 is      : 2 ulp
 accepted: 1 ulp

The problem comes from the addition of tests for the finite-math-only
versions of libm functions.  Those tests share ulps with the default
function variants.  make regen-ulps runs the default tests before the
finite-math-only tests, concatenating the resulting ulps before
feeding them to gen-libm-test.pl to generate a new libm-test-ulps
file.  But gen-libm-test.pl always takes the last ulps value given for
any (function, type) pair.  So, if the largest ulps for a function
come from non-finite inputs, a from-scratch regeneration loses those
ulps.

This patch fixes gen-libm-test.pl, in the case where there are
multiple ulps values for a (function, type) pair - which can only
happen as part of a regeneration - to take the largest ulps value
rather than the last one.

Tested for ARM / MIPS / powerpc-nofpu.

* math/gen-libm-test.pl (parse_ulps): Do not reduce
already-recorded ulps.
* sysdeps/arm/libm-test-ulps: Regenerated.
* sysdeps/mips/mips32/libm-test-ulps: Likewise.
* sysdeps/mips/mips64/libm-test-ulps: Likewise.
* sysdeps/powerpc/nofpu/libm-test-ulps: Likewise.

8 years agoFixed build with assembler w/o AVX-512 support.
Andrew Senkevich [Tue, 19 Jan 2016 11:34:53 +0000 (14:34 +0300)] 
Fixed build with assembler w/o AVX-512 support.

    * sysdeps/x86_64/multiarch/ifunc-impl-list.c: Fixed build with
    assembler not supporting AVX-512.

8 years agoS390: Regenerate ULPs
Stefan Liebler [Tue, 19 Jan 2016 09:00:52 +0000 (10:00 +0100)] 
S390: Regenerate ULPs

I've regenerated ulps from scratch for s390/s390x.
All math testcases are passing afterwards.

ChangeLog:

* sysdeps/s390/fpu/libm-test-ulps: Regenerated.

8 years agoRegenerate MIPS libm-test-ulps.
Joseph Myers [Mon, 18 Jan 2016 23:32:40 +0000 (23:32 +0000)] 
Regenerate MIPS libm-test-ulps.

* sysdeps/mips/mips32/libm-test-ulps: Regenerated.
* sysdeps/mips/mips64/libm-test-ulps: Likewise.

8 years agoRegenerate powerpc-nofpu libm-test-ulps.
Joseph Myers [Mon, 18 Jan 2016 23:02:03 +0000 (23:02 +0000)] 
Regenerate powerpc-nofpu libm-test-ulps.

* sysdeps/powerpc/nofpu/libm-test-ulps: Regenerated.

8 years agoRegenerate ARM libm-test-ulps.
Joseph Myers [Mon, 18 Jan 2016 22:55:47 +0000 (22:55 +0000)] 
Regenerate ARM libm-test-ulps.

* sysdeps/arm/libm-test-ulps: Regenerated.

8 years ago[BZ #19451]
Paul Pluzhnikov [Mon, 18 Jan 2016 22:36:28 +0000 (14:36 -0800)] 
[BZ #19451]
* math/Makefile (libm-vec-tests): Move libraries after wrappers.o to fix
"make check" link failure on Ubuntu.

8 years agoS/390: Do not raise inexact exception in lrint/lround. [BZ #19486]
Stefan Liebler [Mon, 18 Jan 2016 11:48:06 +0000 (12:48 +0100)] 
S/390: Do not raise inexact exception in lrint/lround. [BZ #19486]

I get some math test-failures on s390 for float/double/ldouble for
various lrint/lround functions like:
lrint (0x1p64): Exception "Inexact" set
lrint (-0x1p64): Exception "Inexact" set
lround (0x1p64): Exception "Inexact" set
lround (-0x1p64): Exception "Inexact" set
...

GCC emits "convert to fixed" instructions for casting floating point
values to integer values. These instructions raise invalid and inexact
exceptions if the floating point value exceeds the integer type ranges.

This patch enables the various FIX_DBL_LONG_CONVERT_OVERFLOW macros in
order to avoid a cast from floating point to integer type and raise the
invalid exception with feraiseexcept.
The ldbl-128 rint/round functions are now using the same logic.

ChangeLog:

[BZ #19486]
* sysdeps/s390/fix-fp-int-convert-overflow.h: New File.
* sysdeps/generic/fix-fp-int-convert-overflow.h
(FIX_LDBL_LONG_CONVERT_OVERFLOW,
FIX_LDBL_LLONG_CONVERT_OVERFLOW): New define.
* sysdeps/arm/fix-fp-int-convert-overflow.h: Likewise.
* sysdeps/mips/mips32/fpu/fix-fp-int-convert-overflow.h:
Likewise.
* sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl):
Avoid conversions to long int where inexact exceptions
could be raised.
* sysdeps/ieee754/ldbl-128/s_lroundl.c (__lroundl):
Likewise.
* sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl):
Avoid conversions to long long int where inexact exceptions
could be raised.
* sysdeps/ieee754/ldbl-128/s_llroundl.c (__llroundl):
Likewise.

8 years agoconfigure: make the unsupported error message less hostile
Mike Frysinger [Sat, 16 Jan 2016 00:57:36 +0000 (19:57 -0500)] 
configure: make the unsupported error message less hostile

8 years agoFixed typos in __memcpy_chk.
Andrew Senkevich [Sat, 16 Jan 2016 11:42:26 +0000 (14:42 +0300)] 
Fixed typos in __memcpy_chk.

    * sysdeps/x86_64/multiarch/memcpy_chk.S: Fixed typos.

8 years agosparc: mman.h: fix bad comment insertion
Mike Frysinger [Sat, 16 Jan 2016 07:31:25 +0000 (02:31 -0500)] 
sparc: mman.h: fix bad comment insertion

The MCL_ONFAULT define was inserted into the middle of a comment which
breaks the build.

8 years agonptl: Add first-line description for barrier tests.
Torvald Riegel [Fri, 15 Jan 2016 22:16:49 +0000 (23:16 +0100)] 
nptl: Add first-line description for barrier tests.

8 years agoFix pthread_barrier_init typo.
Torvald Riegel [Fri, 15 Jan 2016 21:40:50 +0000 (22:40 +0100)] 
Fix pthread_barrier_init typo.

Applies Paul Eggert's fix for BZ 18868.

8 years agoAdded memcpy/memmove family optimized with AVX512 for KNL hardware.
Andrew Senkevich [Fri, 15 Jan 2016 21:49:45 +0000 (00:49 +0300)] 
Added memcpy/memmove family optimized with AVX512 for KNL hardware.

Added AVX512 implementations of memcpy, mempcpy, memmove, memcpy_chk,
mempcpy_chk, memmove_chk.
It shows average improvement more than 30% over AVX versions on KNL
hardware (performance results in the thread
<https://sourceware.org/ml/libc-alpha/2016-01/msg00258.html>).

    * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Added new files.
    * sysdeps/x86_64/multiarch/ifunc-impl-list.c: Added new tests.
    * sysdeps/x86_64/multiarch/memcpy-avx512-no-vzeroupper.S: New file.
    * sysdeps/x86_64/multiarch/mempcpy-avx512-no-vzeroupper.S: Likewise.
    * sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S: Likewise.
    * sysdeps/x86_64/multiarch/memcpy.S: Added new IFUNC branch.
    * sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise.
    * sysdeps/x86_64/multiarch/memmove.c: Likewise.
    * sysdeps/x86_64/multiarch/memmove_chk.c: Likewise.
    * sysdeps/x86_64/multiarch/mempcpy.S: Likewise.
    * sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise.

8 years agoNew pthread_barrier algorithm to fulfill barrier destruction requirements.
Torvald Riegel [Wed, 24 Jun 2015 12:37:32 +0000 (14:37 +0200)] 
New pthread_barrier algorithm to fulfill barrier destruction requirements.

The previous barrier implementation did not fulfill the POSIX requirements
for when a barrier can be destroyed.  Specifically, it was possible that
threads that haven't noticed yet that their round is complete still access
the barrier's memory, and that those accesses can happen after the barrier
has been legally destroyed.
The new algorithm does not have this issue, and it avoids using a lock
internally.

8 years agoFix race in tst-mqueue5
Paul E. Murphy [Mon, 11 Jan 2016 22:24:04 +0000 (17:24 -0500)] 
Fix race in tst-mqueue5

The check is done on line 117 by a thread spawned
from do_child(), forked from do_test().  This test
generates a signal in the forked process.

Either thread may handle the signal, and on ppc,
it happens to be done on do_child, on the thread
which is not doing the check on line 117.

This exposes a race condition whereby the test
incorrectly fails as the signal is caught during
or after the check.

This is mitigated by ensuring the signal is blocked
in the child thread while thread is running.

8 years agoHave iconv accept redundant escape sequences in IBM900, IBM903, IBM905,
Martin Sebor [Fri, 15 Jan 2016 18:25:13 +0000 (11:25 -0700)] 
Have iconv accept redundant escape sequences in IBM900, IBM903, IBM905,
IBM907, and IBM909.

Patch for bug #17197 changes the encoder to avoid generating redundant
shift sequences.  However, those sequences may already be present in
data encododed by prior versions of the encoder.  This change modifies
the decoder to also avoid rejecting redundant shift sequences.

        [BZ #19432]
        * iconvdata/Makefile: Add bug-iconv11.
        * iconvdata/bug-iconv11.c: New test.
        * iconvdata/ibm930.c: Do not reject redundant shift sequences.
        * iconvdata/ibm933.c: Same.
        * iconvdata/ibm935.c: Same.
        * iconvdata/ibm937.c: Same.
        * iconvdata/ibm939.c: Same.

8 years agoFix build failures with -DDEBUG.
Martin Sebor [Fri, 15 Jan 2016 18:07:41 +0000 (11:07 -0700)] 
Fix build failures with -DDEBUG.

        [BZ #19443]
        * crypt/crypt_util.c [DEBUG] (_ufc_prbits): Correct format string.
        [DEBUG] (_ufc_set_bits): Declare used.
        * iconv/gconv_dl.c [DEBUG]: Add a missing include directive.
        [DEBUG] (print_all): Declare used.
        * resolv/res_send.c [DEBUG] (__libc_res_nsend): Explicitly convert
        operands of the ternary ?: expression to target type.
        * stdlib/rshift.c [DEBUG] (mpn_rshift): Use assert() instead of
        calling the undeclared abort.
        * time/mktime.c [DEBUG] (DEBUG): Rename to DEBUG_MKTIME.

8 years agoFix build errors with -DNDEBUG.
Martin Sebor [Fri, 15 Jan 2016 17:44:07 +0000 (10:44 -0700)] 
Fix build errors with -DNDEBUG.

        [BZ #18755]
        * iconv/skeleton.c (FUNCTION_NAME): Suppress -Wunused-but-set-variable
        warnings.
        * sysdeps/nptl/gai_misc.h (__gai_start_notify_thread): Same.
        (__gai_create_helper_thread): Same.
        * nscd/nscd.c (do_exit): Suppress -Wunused-variable.
        * iconvdata/iso-2022-cn-ext.c (BODY): Initialize local variable
        to suppress -Wmaybe-uninitialized warnings.

8 years agoCall math_opt_barrier inside if
H.J. Lu [Fri, 15 Jan 2016 13:22:59 +0000 (05:22 -0800)] 
Call math_opt_barrier inside if

Since floating-point operation may trigger floating-point exceptions,
we call math_opt_barrier inside if to prevent code motion.

[BZ #19465]
* sysdeps/ieee754/dbl-64/s_fma.c (__fma): Call math_opt_barrier
inside if.
* sysdeps/ieee754/ldbl-128/s_fmal.c (__fmal): Likewise.
* sysdeps/ieee754/ldbl-96/s_fma.c (__fma): Likewise.
* sysdeps/ieee754/ldbl-96/s_fmal.c (__fmal): Likewise.

8 years agoUse TIME_T_MAX and TIME_T_MIN in tst-mktime2.c
H.J. Lu [Fri, 15 Jan 2016 00:35:24 +0000 (16:35 -0800)] 
Use TIME_T_MAX and TIME_T_MIN in tst-mktime2.c

GCC 5.3 compiles

for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
    continue;

into an infinite loop with -Os.  We can copy TIME_T_MAX and TIME_T_MIN
from time/mktime.c.

[BZ #19466]
* time/tst-mktime2.c (time_t_max): Removed.
(time_t_min): Likewise.
(TYPE_SIGNED): New.
(TYPE_MINIMUM): Likewise.
(TYPE_MAXIMUM): Likewise.
(TIME_T_MIN): Likewise.
(TIME_T_MAX): Likewise.
(mktime_test): Replace time_t_max and time_t_min with TIME_T_MAX
and TIME_T_MIN.
(do_test): Likewise.

8 years agoSet index_Fast_Unaligned_Load for Excavator family CPUs
Amit Pawar [Thu, 14 Jan 2016 14:36:02 +0000 (20:06 +0530)] 
Set index_Fast_Unaligned_Load for Excavator family CPUs

GLIBC benchtest testcases shows SSE2_Unaligned based implementations
are performing faster compare to SSE2 based implementations for
routines: strcmp, strcat, strncat, stpcpy, stpncpy, strcpy, strncpy
and strstr. Flag index_Fast_Unaligned_Load is set for Excavator family
0x15h CPU's. This makes SSE2_Unaligned based implementations as
default for these routines.

[BZ #19467]
* sysdeps/x86/cpu-features.c (init_cpu_features): Set
index_Fast_Unaligned_Load flag for Excavator family CPUs.

8 years agoAdd __private_ss to s390 struct tcbhead.
Marcin Kościelnicki [Thu, 14 Jan 2016 15:48:55 +0000 (16:48 +0100)] 
Add __private_ss to s390 struct tcbhead.

Preparation for gcc -fsplit-stack support (gcc bug #68191).  The new
field is basically identical to the one on x86.  Its TCB offset needs
to be constant, as it'll be hardcoded in gcc.

ChangeLog:

* sysdeps/s390/nptl/tls.h (struct tcbhead_t): Add __private_ss field.

8 years agoUse $(PYTHON) to run benchtests python files.
Carlos O'Donell [Wed, 13 Jan 2016 16:00:57 +0000 (11:00 -0500)] 
Use $(PYTHON) to run benchtests python files.

8 years agoFix O_DIRECTORY lookup on trivial translators
Flavio Cruz [Tue, 12 Jan 2016 23:48:30 +0000 (00:48 +0100)] 
Fix O_DIRECTORY lookup on trivial translators

* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Do not remove
leading slash when `file_name' is "/".

8 years agoAdd new header definitions from Linux 4.4 (plus older ptrace definitions).
Joseph Myers [Tue, 12 Jan 2016 12:42:55 +0000 (12:42 +0000)] 
Add new header definitions from Linux 4.4 (plus older ptrace definitions).

This patch adds some new header definitions from Linux 4.4:

* MCL_ONFAULT is added to bits/mman.h / bits/mman-linux.h (this was
  already done for hppa).

* PTRACE_SECCOMP_GET_FILTER is added to sys/ptrace.h.  Along with it,
  the older PTRACE_GETSIGMASK and PTRACE_SETSIGMASK, added in Linux
  3.11 but missed at the time, are also added.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

* bits/mman-linux.h [!MCL_CURRENT] (MCL_ONFAULT): New macro.
* sysdeps/unix/sysv/linux/alpha/bits/mman.h (MCL_ONFAULT):
Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/mman.h (MCL_ONFAULT):
Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/mman.h (MCL_ONFAULT):
Likewise.
* sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_GETSIGMASK): New
enum constant and macro.
(PTRACE_SETSIGMASK): Likewise.
(PTRACE_SECCOMP_GET_FILTER): Likewise.
* sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
(PTRACE_GETSIGMASK): Likewise.
(PTRACE_SETSIGMASK): Likewise.
(PTRACE_SECCOMP_GET_FILTER): Likewise.
* sysdeps/unix/sysv/linux/ia64/sys/ptrace.h (PTRACE_GETSIGMASK):
Likewise.
(PTRACE_SETSIGMASK): Likewise.
(PTRACE_SECCOMP_GET_FILTER): Likewise.
* sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
(PTRACE_GETSIGMASK): Likewise.
(PTRACE_SETSIGMASK): Likewise.
(PTRACE_SECCOMP_GET_FILTER): Likewise.
* sysdeps/unix/sysv/linux/s390/sys/ptrace.h (PTRACE_GETSIGMASK):
Likewise.
(PTRACE_SETSIGMASK): Likewise.
(PTRACE_SECCOMP_GET_FILTER): Likewise.
* sysdeps/unix/sysv/linux/sparc/sys/ptrace.h (PTRACE_GETSIGMASK):
Likewise.
(PTRACE_SETSIGMASK): Likewise.
(PTRACE_SECCOMP_GET_FILTER): Likewise.
* sysdeps/unix/sysv/linux/tile/sys/ptrace.h (PTRACE_GETSIGMASK):
Likewise.
(PTRACE_SETSIGMASK): Likewise.
(PTRACE_SECCOMP_GET_FILTER): Likewise.

8 years agoFix isinf/isnan declaration conflict with C++11
Adhemerval Zanella [Mon, 11 Jan 2016 15:34:52 +0000 (13:34 -0200)] 
Fix isinf/isnan declaration conflict with C++11

GLIBC declares isinf and isnan as expected by Unix98 and for C99 programs
these functions are hidden by the generics inf and isnan macros.
However C++11 defines isinf and isnan with the same semantics as C99
but requires that they are functions not macros (C++11 26.8 [c.math]
paragraph 10).

This then results in a conflict for perfectly valid C++11 programs:

--
using std::isinf;
using std::isnan;

double d1 = isinf(1.0);
double d2 = isnan(1.0);

d.cc:3:12: error: ‘constexpr bool std::isinf(double)’ conflicts with a previous declaration
 using std::isinf;
[...]
/usr/include/bits/mathcalls.h:201:1: note: previous declaration ‘int isinf(double)’
 __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
[...]
--

This patch fixes the prototypes by leaving the obsolete functions
defined for C++98 code (since they do not conflict with any standard
function in C++98), however preventing them on C++11.

No issues found in libstdc++ tests and check on x86_64 and i686 with
glibc testsuite.

Patch from Jonathan Wakely  <jwakely.gcc@gmail.com>.

[BZ #19439]
* math/bits/mathcalls.h
[!__cplusplus || __cplusplus < 201103L] (isinf): Do not declare
prototype.
[!__cplusplus || __cplusplus < 201103L] (isnan): Likewise.

8 years agoForce rereading TZDEFRULES after it was used to set DST rules only (bug #19253)
Andreas Schwab [Tue, 17 Nov 2015 10:43:49 +0000 (11:43 +0100)] 
Force rereading TZDEFRULES after it was used to set DST rules only (bug #19253)

If the TZDEFRULES file was used to set the DST rules when $TZ didn't
provide any we need to make sure that the next time it is used we
recompute everything as __tzfile_default changes some setting from what is
provided by TZDEFRULES.

8 years agoFix doc quoting problems with Texinfo 5
Paul Eggert [Sun, 10 Jan 2016 08:20:03 +0000 (00:20 -0800)] 
Fix doc quoting problems with Texinfo 5

Without this change, in the info file output, Texinfo 5 quotes code
in text with undirected single quotes 'like this' and generates
code examples that with many PDF readers cannot be cut out of PDFs
and pasted into code.
* manual/libc.texinfo: Configure the libc manual like the GNU
Emacs manual, by using @documentencoding and setting
txicodequoteundirected and txicodequotebacktick.  This way,
Texinfo 5 quotes code in text with directed single quotes ‘like
this’ and produces examples that can be cut out of PDFs.  This
change causes Texinfo 5 to generate info files that contain UTF-8
characters in the set {'‘', '’', '“', '”', 'Ä', 'ä', 'ö', '−',
'–', '—', '©', '⇒', '•', '…'}, which is OK nowadays.

8 years agolocaledata: nl_NL: date_fmt: rewrite to match standards [BZ #16495]
Evert [Mon, 4 Jan 2016 22:20:58 +0000 (17:20 -0500)] 
localedata: nl_NL: date_fmt: rewrite to match standards [BZ #16495]

Add some references to public Dutch standards.

8 years agopowerpc: Enforce compiler barriers on hardware transactions
Tulio Magno Quites Machado Filho [Mon, 28 Dec 2015 14:24:43 +0000 (12:24 -0200)] 
powerpc: Enforce compiler barriers on hardware transactions

Work around a GCC behavior with hardware transactional memory built-ins.
GCC doesn't treat the PowerPC transactional built-ins as compiler
barriers, moving instructions past the transaction boundaries and
altering their atomicity.

8 years agoMake shebang interpreter directives consistent
Marko Myllynen [Fri, 8 Jan 2016 13:11:15 +0000 (15:11 +0200)] 
Make shebang interpreter directives consistent

Undo changes in files maintained elsewhere.

8 years agopowerpc: Add hwcap2 bits for POWER9.
Carlos Eduardo Seo [Tue, 5 Jan 2016 17:13:18 +0000 (15:13 -0200)] 
powerpc: Add hwcap2 bits for POWER9.

Added hwcap2 bit masks for Power ISA 3.0 and VSX IEEE binary float 128-bit
features.

8 years agohppa: fix dladdr [BZ #19415]
John David Anglin [Sat, 2 Jan 2016 14:48:18 +0000 (09:48 -0500)] 
hppa: fix dladdr [BZ #19415]

The attached patch fixes dladdr on hppa.

Instead of using the generic version of _dl_lookup_address, we use an
implementation more or less modeled after __canonicalize_funcptr_for_compare()
in gcc.  The function pointer is analyzed and if it points to the
trampoline used to call _dl_runtime_resolve just before the global
offset table, then we call _dl_fixup to resolve the function pointer.
Then, we return the instruction pointer from the first word of the
descriptor.

The change fixes the testcase provided in [BZ #19415] and the Debian
nss package now builds successfully.

8 years agolonglong: fix sh -Wundef builds
Mike Frysinger [Thu, 7 Jan 2016 22:18:09 +0000 (17:18 -0500)] 
longlong: fix sh -Wundef builds

This file fails when building for SuperH as it assumes __SHMEDIA__
is always defined.  Update the code to check if it's defined.

8 years agolonglong: add SH FDPIC support
Andrew Stubbs [Tue, 27 Oct 2015 13:36:47 +0000 (13:36 +0000)] 
longlong: add SH FDPIC support

8 years agolonglong.h: Disable alpha umul_ppmm for old g++
Richard Henderson [Tue, 28 Oct 2014 20:26:24 +0000 (13:26 -0700)] 
longlong.h: Disable alpha umul_ppmm for old g++

Causes "unexpected AST of kind MULT_HIGHPART" error with bootstrap from gcc 4.8.

8 years agoxstat: only check to see if __ASSUME_ST_INO_64_BIT is defined
Mike Frysinger [Thu, 7 Jan 2016 00:51:28 +0000 (19:51 -0500)] 
xstat: only check to see if __ASSUME_ST_INO_64_BIT is defined

We define __ASSUME_ST_INO_64_BIT by default for Linux targets, and then
undef it for alpha/sh targets.  But the code that uses it looks at its
value (as 0/1) rather than whether it's defined (like all other assume
knobs).  Change the code to see if it's defined to fix build Wundef build
errors for alpha/sh.

8 years agoUpdate timezone code from tzcode 2015g.
Paul Eggert [Thu, 7 Jan 2016 11:45:07 +0000 (11:45 +0000)] 
Update timezone code from tzcode 2015g.

This patch updates the timezone code from tzcode 2015g.  The Makefile
and README changes are based on those in Paul's patch
<https://sourceware.org/ml/libc-alpha/2015-05/msg00553.html>.

Tested for x86_64 and x86.

2016-01-06  Paul Eggert  <eggert@cs.ucla.edu>
    Joseph Myers  <joseph@codesourcery.com>

* timezone/private.h: Update from tzcode 2015g.
* timezone/tzfile.h: Likewise.
* timezone/tzselect.ksh: Likewise.
* timezone/zdump.c: Likewise.
* timezone/zic.c: Likewise.
* timezone/ialloc.c: Remove file.
* timezone/scheck.c: Likewise.
* timezone/Makefile (extra-objs): Remove variable.
($(objpfx)zic): Do not depend on scheck.o and ialloc.o.
(tz-cflags): Add -DHAVE_GETTEXT -DUSE_LTZ=0
-Wno-maybe-uninitialized.
(CFLAGS-zdump.c): Remove -fwrapv -DNOID -DHAVE_GETTEXT.
(CFLAGS-zic.c): Remove -DNOID -DHAVE_GETTEXT.
(CFLAGS-ialloc.c): Remove variable.
(CFLAGS-scheck.c): Likewise.
* timezone/README: Update list of files from tzcode.

8 years agoargp: Use fwrite_unlocked instead of __fxprintf when !_LIBC
Khem Raj [Fri, 1 Jan 2016 20:20:26 +0000 (20:20 +0000)] 
argp: Use fwrite_unlocked instead of __fxprintf when !_LIBC

__fxprintf is not available when argp is built outside libc.
gnulib has the same logic already.

8 years agoMake shebang interpreter directives consistent
Marko Myllynen [Thu, 7 Jan 2016 08:51:53 +0000 (10:51 +0200)] 
Make shebang interpreter directives consistent

8 years agohppa: fix pthread spinlock
John David Anglin [Sun, 4 May 2014 18:02:30 +0000 (14:02 -0400)] 
hppa: fix pthread spinlock

URL: https://bugs.debian.org/725508

8 years agoUpdate copyright dates committed in 2016
H.J. Lu [Wed, 6 Jan 2016 22:03:10 +0000 (14:03 -0800)] 
Update copyright dates committed in 2016

8 years agoMark internal unistd functions hidden in ld.so
H.J. Lu [Wed, 6 Jan 2016 20:37:04 +0000 (12:37 -0800)] 
Mark internal unistd functions hidden in ld.so

Since internal unistd functions are only used internally in ld.so and
libc.so, they can be made hidden.  __close, __getcwd, __getpid,
__libc_read and __libc_write can't be hidden in ld.so on Hurd since they
will be preempted by the ones in libc.so after bootstrap.

[BZ #19122]
* include/unistd.h [IS_IN (rtld)]: Include <dl-unistd.h>.
* sysdeps/generic/dl-unistd.h: New file.
* sysdeps/mach/hurd/dl-unistd.h: Likewise.

8 years agoMark ld.so internal mmap functions hidden in ld.so
H.J. Lu [Wed, 6 Jan 2016 19:28:04 +0000 (11:28 -0800)] 
Mark ld.so internal mmap functions hidden in ld.so

Since ld.so internal mmap functions are only used internally in ld.so,
they can be made hidden.  Don't hide __mmap on Hurd, since __mmap in
ld.so will be preempted by the one in libc.so after bootstrap.

 [BZ #19122]
 * include/sys/mman.h [IS_IN (rtld)]: Include <dl-mman.h>.
 * sysdeps/generic/dl-mman.h: New file.
 * sysdeps/mach/hurd/dl-mman.h: Likewise.

8 years agoUpdate miscellaneous files from upstream sources.
Joseph Myers [Tue, 5 Jan 2016 18:04:06 +0000 (18:04 +0000)] 
Update miscellaneous files from upstream sources.

This patch updates texinfo.tex, config.guess, config.sub and
move-if-change from their respective upstream sources.

* manual/texinfo.tex: Update to version 2016-01-04.21 with
trailing whitespace removed.
* scripts/config.guess: Update to version 2016-01-01.
* scripts/config.sub: Update to version 2016-01-01.
* scripts/move-if-change: Update from gnulib.

8 years agoEliminate redundant sign extensions in pow()
Anton Blanchard [Mon, 4 Jan 2016 15:28:52 +0000 (13:28 -0200)] 
Eliminate redundant sign extensions in pow()

When looking at the code generated for pow() on ppc64 I noticed quite
a few sign extensions. Making the array indices unsigned reduces the
number of sign extensions from 24 to 7.

Tested for powerpc64le and x86_64.

8 years agoUpdate copyright dates not handled by scripts/update-copyrights.
Joseph Myers [Mon, 4 Jan 2016 16:26:30 +0000 (16:26 +0000)] 
Update copyright dates not handled by scripts/update-copyrights.

I've updated copyright dates in glibc for 2016.  This is the patch for
the changes not generated by scripts/update-copyrights and subsequent
build / regeneration of generated files.

* NEWS: Update copyright dates.
* catgets/gencat.c (print_version): Likewise.
* csu/version.c (banner): Likewise.
* debug/catchsegv.sh: Likewise.
* debug/pcprofiledump.c (print_version): Likewise.
* debug/xtrace.sh (do_version): Likewise.
* elf/ldconfig.c (print_version): Likewise.
* elf/ldd.bash.in: Likewise.
* elf/pldd.c (print_version): Likewise.
* elf/sotruss.sh: Likewise.
* elf/sprof.c (print_version): Likewise.
* iconv/iconv_prog.c (print_version): Likewise.
* iconv/iconvconfig.c (print_version): Likewise.
* locale/programs/locale.c (print_version): Likewise.
* locale/programs/localedef.c (print_version): Likewise.
* login/programs/pt_chown.c (print_version): Likewise.
* malloc/memusage.sh (do_version): Likewise.
* malloc/memusagestat.c (print_version): Likewise.
* malloc/mtrace.pl: Likewise.
* manual/libc.texinfo: Likewise.
* nptl/version.c (banner): Likewise.
* nscd/nscd.c (print_version): Likewise.
* nss/getent.c (print_version): Likewise.
* nss/makedb.c (print_version): Likewise.
* posix/getconf.c (main): Likewise.
* scripts/test-installation.pl: Likewise.
* sysdeps/unix/sysv/linux/lddlibc4.c (main): Likewise.

8 years agoUpdate copyright dates with scripts/update-copyrights.
Joseph Myers [Mon, 4 Jan 2016 16:05:18 +0000 (16:05 +0000)] 
Update copyright dates with scripts/update-copyrights.

8 years agohppa: Add MAP_HUGETLB and MAP_STACK defines [BZ #19285]
Helge Deller [Sat, 2 Jan 2016 22:31:12 +0000 (23:31 +0100)] 
hppa: Add MAP_HUGETLB and MAP_STACK defines [BZ #19285]

The attached patch adds some upstream defines like MAP_HUGETLB and MAP_STACK
in mman.h for the hppa architecture.

The existing MADV_xxK_PAGES defines were dropped upstream, because they were
originally added many years ago based on a proposed patch for the Linux kernel
which was never applied. So, this patch drops those unneeded defines.

8 years agoia64: fpu: fix gamma definition handling [BZ #15421]
Mike Frysinger [Tue, 29 Dec 2015 06:06:30 +0000 (01:06 -0500)] 
ia64: fpu: fix gamma definition handling [BZ #15421]

The rework in commit d709042a6e5ab3c360280faad6f9538a34dc8eea broke
buiding on ia64 due to compat_symbol expanding into ... in some cases.
The common files were wrapped in a BUILD_LGAMMA check, but the ia64
ones were not.  Add that logic to the ia64 files too.

8 years agoFix linux personality syscall wrapper
Dmitry V. Levin [Sun, 27 Dec 2015 16:30:02 +0000 (16:30 +0000)] 
Fix linux personality syscall wrapper

The personality system call, starting with linux kernel commit
v2.6.29-6609-g11d06b2a1e5658f448a308aa3beb97bacd64a940, always
successfully changes the personality if requested.  The syscall
wrapper, however, still can return an error in the following cases:
- the value returned by the system call looks like an error
due to architecture limitations of 32-bit kernels;
- a personality greater than 0xffffffff is passed to the system call,
and the 64-bit kernel does not have commit
v2.6.35-rc1-372-g485d527686850d68a0e9006dd9904f19f122485e
that would truncate this value to unsigned int;
- on sparc64, the value returned by the system call looks like an error
due to sparc64 kernel sign extension bug.

The solution is three-fold:
- move generic syscalls.list personality entry to generic 64-bit
syscalls.list file;
- for each 32-bit architecture that use negated errno semantics,
add a NOERRNO personality entry to their syscalls.list file;
- for sparc64 and 32-bit architectures that use dedicated registers
to flag syscall errors, add a wrapper around personality syscall;
if the system call return value is flagged as an error, this wrapper
returns the negated "would be errno" value, otherwise it returns
the system call return value; on sparc64, it also truncates the
personality argument to unsigned int before passing it to the kernel.

[BZ #19408]
* sysdeps/unix/sysv/linux/personality.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/personality.c: Likewise.
* sysdeps/unix/sysv/linux/tst-personality.c: Likewise.
* sysdeps/unix/sysv/linux/Makefile [$(subdir) == misc]
(sysdep_routines): Add personality.
(tests): Add tst-personality.
* sysdeps/unix/sysv/linux/syscalls.list (personality): Move ...
* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: ... here.
* sysdeps/unix/sysv/linux/arm/syscalls.list (personality): New entry.
* sysdeps/unix/sysv/linux/hppa/syscalls.list (personality): Likewise.
* sysdeps/unix/sysv/linux/i386/syscalls.list (personality): Likewise.
* sysdeps/unix/sysv/linux/m68k/syscalls.list (personality): Likewise.
* sysdeps/unix/sysv/linux/microblaze/syscalls.list (personality):
Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (personality):
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (personality):
Likewise.
* sysdeps/unix/sysv/linux/sh/syscalls.list (personality): Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/syscalls.list (personality):
Likewise.

8 years agoCleanup ARM ioperm implementation (step 2)
Aurelien Jarno [Tue, 29 Dec 2015 14:27:56 +0000 (15:27 +0100)] 
Cleanup ARM ioperm implementation (step 2)

Since GLIBC requires a minimum 2.6.32 kernel, the sysctl (CTL_BUS,
CTL_BUS_ISA, ISA_*) is always available.  We can therefore remove the
fallback code reading /etc/arm_systype or parsing /proc/cpuinfo.

Remove fscanf from localplt.data as it is no longer called from within
GLIBC.

* sysdeps/unix/sysv/linux/arm/ioperm.c: Do not include <string.h>.
(PATH_ARM_SYSTYPE): Remove.
(PATH_CPUINFO): Likewise.
(IO_BASE_FOOTBRIDGE): Likewise.
(IO_SHIFT_FOOTBRIDGE): Likewise.
(struct platform): Likewise.
(init_iosys): Remove compatibility code for 2.4 kernels.
* sysdeps/unix/sysv/linux/arm/localplt.data: Remove fscanf.

8 years agolocaledata: nl_NL@euro: copy measurement from nl_NL [BZ #19198]
Mike Frysinger [Wed, 30 Dec 2015 04:19:54 +0000 (23:19 -0500)] 
localedata: nl_NL@euro: copy measurement from nl_NL [BZ #19198]

No real changes here as the output is the same.  Just making the input
a little bit nicer.

8 years agomalloc: Test various special cases related to allocation failures
Florian Weimer [Tue, 29 Dec 2015 19:32:35 +0000 (20:32 +0100)] 
malloc: Test various special cases related to allocation failures

This test case exercises unusual code paths in allocation functions,
related to allocation failures.  Specifically, the test can reveal
the following bugs:

(a) calloc returns non-zero memory on fallback to sysmalloc.
(b) calloc can self-deadlock because it fails to release
    the arena lock on certain allocation failures.
(c) pvalloc can dereference a NULL arena pointer.

(a) and (b) appear specific to a faulty downstream backport.
(c) was fixed as part of commit 10ad46bc6526edc5c7afcc57112da96917ff3629.

The test for (a) was inspired by a reproducer supplied by Jeff Layton.

8 years agolocaledata: bg_BG: use colon as time separator [BZ #19385]
Damyan Ivanov [Tue, 29 Dec 2015 18:45:25 +0000 (13:45 -0500)] 
localedata: bg_BG: use colon as time separator [BZ #19385]

The only official source is the "Official spelling dictionary of the
Bulgarian language, Prosveta 2012", which states there are three ways
to separate time components: comma, colon and dot. That same dictionary
doesn't say which one is preferred.

So I turned to the mailing list of the translators of free software in
Bulgarian. The consensus is that colon is the only separator that is
widely used in Bulgarian texts and everything else will just be confusing.

URL: http://lists.ludost.net/pipermail/dict/2015-December/000538.html

8 years agolist-fixed-bugs: use argparse for the commandline
Mike Frysinger [Tue, 10 Nov 2015 05:41:33 +0000 (00:41 -0500)] 
list-fixed-bugs: use argparse for the commandline

This makes the interface more friendly to users.

8 years agoresolv: Reset defdname before use in __res_vinit [BZ #19369]
Rob Wu [Wed, 16 Dec 2015 11:53:27 +0000 (12:53 +0100)] 
resolv: Reset defdname before use in __res_vinit [BZ #19369]

Resetting defdname (default domain name) before use in __res_vinit
ensures that the default domain name is correctly set to a default
value when it is not set by the LOCALDOMAIN environment variable or
the "domain" or "search" parameters in resolv.conf

Tested using the steps from:
https://sourceware.org/bugzilla/show_bug.cgi?id=19369

8 years agohppa: Define __NO_LONG_DOUBLE_MATH so headers are consistent with libm build [BZ...
John David Anglin [Sun, 22 Nov 2015 22:15:04 +0000 (17:15 -0500)] 
hppa: Define __NO_LONG_DOUBLE_MATH so headers are consistent with libm build [BZ #19270]

The attached patch fixes BZ #19270 and the Debian gmt package now builds
successfully.  Aside from the comment, the define of __NO_LONG_DOUBLE_MATH
is similar to that in the generic version of glibc.

Build tested on hppa-unknown-linux-gnu with no observed regressions.

8 years agoia64: fpu: fix gammaf typo [BZ #15421]
Mike Frysinger [Tue, 29 Dec 2015 03:18:22 +0000 (22:18 -0500)] 
ia64: fpu: fix gammaf typo [BZ #15421]

The lgamma rewrite in commit d709042a6e5ab3c360280faad6f9538a34dc8eea
used "gammaf" in this function when it should have used "gamma".