Florian Weimer [Tue, 23 Dec 2014 15:16:32 +0000 (16:16 +0100)]
iconvdata/run-iconv-test.sh: Actually test iconv modules
Arjun Shankar noticed that this test case was not testing anything
because iconv was invoked without the required arguments.
Joseph Myers [Mon, 22 Dec 2014 21:42:03 +0000 (21:42 +0000)]
Make __ASSUME_UTIMES hppa-specific.
This patch makes __ASSUME_UTIMES hppa-specific, removing mentions of
the macro from architecture-independent code and code for other
architectures. (All other architectures either have the utimes
syscall in all relevant kernel versions, or use the asm-generic
interface so only have utimensat and won't get the utimes syscall.) A
similar approach is used to that used for futimesat for MicroBlaze: if
the kernel is recent enough that the utimes syscall can be assumed to
be present, use the implementation in terms of the utimes syscall, and
otherwise use the linux/generic implementation in terms of utimensat.
Tested x86_64 that the disassembly of installed shared libraries is
unchanged by the patch. Not tested for hppa.
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES): Do
not define.
* sysdeps/unix/sysv/linux/utimes.c: Do not include
<kernel-features.h>.
(__utimes) [__NR_utimes]: Make code unconditional.
(__utimes) [!__ASSUME_UTIMES]: Remove conditional code.
* sysdeps/unix/sysv/linux/aarch64/kernel-features.h
(__ASSUME_UTIMES): Do not undefine.
* sysdeps/unix/sysv/linux/tile/kernel-features.h
(__ASSUME_UTIMES): Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
(__ASSUME_UTIMES): Define for [__LINUX_KERNEL_VERSION >= 0x030e00]
instead of undefining for [__LINUX_KERNEL_VERSION < 0x030e00].
* sysdeps/unix/sysv/linux/hppa/utimes.c: New file.
Steve Ellcey [Mon, 22 Dec 2014 21:29:20 +0000 (13:29 -0800)]
Fix preprocessor indentation in sysdeps/mips/memcpy.S.
Checked in as obvious.
Chris Metcalf [Mon, 22 Dec 2014 21:24:32 +0000 (16:24 -0500)]
NEWS: mention bug fix for 17747.
Chris Metcalf [Mon, 22 Dec 2014 20:24:17 +0000 (15:24 -0500)]
Fix namespace conformance issue with Bessel functions.
[BZ #17747]
The y0/y1/yn and j0/j1/jn functions provided a strong_alias
to the "l"-suffixed variants when no long double support is
being compiled. This breaks namespace conformance when the
basename versions conform but the l-suffixed ones don't.
Fixed by making them weak aliases instead.
Chris Metcalf [Mon, 22 Dec 2014 19:50:26 +0000 (14:50 -0500)]
tilegx: remove implicit boolean conversion in strstr.
[BZ #17746]
The __builtin_expect() truncated a uint64_t to a 32-bit long
in ILP32 mode, discarding the high 32 bits, and potentially
missing the NUL terminator that we were searching for with SIMD
operations. Explicitly compare to zero to fix the problem.
Chris Metcalf [Mon, 22 Dec 2014 19:45:02 +0000 (14:45 -0500)]
Update NEWS and ChangeLog with two tile bug fixes.
I committed fixes without references to bug numbers.
Bug 17744: commit
95dee05f.
Bug 17745: commit
e969965a.
Steve Ellcey [Mon, 22 Dec 2014 18:49:56 +0000 (10:49 -0800)]
2014-12-22 Steve Ellcey <sellcey@imgtec.com>
* sysdeps/unix/mips/sysdep.h (__mips_isa_rev): Set
to zero if not already defined.
Joseph Myers [Mon, 22 Dec 2014 18:45:50 +0000 (18:45 +0000)]
Split __kernel_standard* functions (fixes bug 17724).
Bug 17724 reports references to fesetround being brought in by
ldbl-128ibm rintl via references to __rintl from __kernel_standard_l.
Because all three __kernel_standard* functions are in the same file,
this gets brought in even though only the long double version
__kernel_standard_l needs __rintl, and the C90 functions use only
__kernel_standard.
This patch fixes this by splitting the three versions into separate
files; it's fine for long double functions to refer to fe* functions
directly, unless they get called by C90 double functions.
Tested for x86_64 (testsuite; the reordering of code means disassembly
of shared libraries can't usefully be compared). Tested for powerpc
that the relevant issue disappears from the linknamespace test
output.
[BZ #17724]
* sysdeps/ieee754/k_standard.c: Don't include <float.h>.
(__kernel_standard_f): Remove. Moved to k_standardf.c.
(__kernel_standard_l): Remove. Moved to k_standardl.c with
(char *) casts added.
* sysdeps/ieee754/k_standardf.c: New file.
* sysdeps/ieee754/k_standardl.c: Likewise.
* math/Makefile (libm-support): Remove k_standard.
(libm-calls): Add k_standard.
Steve Ellcey [Mon, 22 Dec 2014 18:36:49 +0000 (10:36 -0800)]
Remove trailing whitespace.
Steve Ellcey [Mon, 22 Dec 2014 18:35:32 +0000 (10:35 -0800)]
Add missing ChangeLog entries from Friday (Dec 19, 2014).
Wilco Dijkstra [Mon, 22 Dec 2014 17:11:18 +0000 (17:11 +0000)]
Optimize to avoid an unnecessary FPCR read.
Wilco Dijkstra [Mon, 22 Dec 2014 17:07:16 +0000 (17:07 +0000)]
Optimize to reduce FPCR/FPSR accesses.
Wilco Dijkstra [Mon, 22 Dec 2014 17:01:33 +0000 (17:01 +0000)]
Call libc_fetestexcept_aarch64.
Wilco Dijkstra [Mon, 22 Dec 2014 16:57:41 +0000 (16:57 +0000)]
Call libc_fesetround_aarch64.
Joseph Myers [Mon, 22 Dec 2014 12:46:27 +0000 (12:46 +0000)]
Fix resolver bind, getsockname namespace (bug 17733).
On Linux architectures using socketcall, the resolver ends up bringing
in strong symbols for bind and getsockname, which are not in
POSIX.1-1996. This causes linknamespace test failures:
FAIL: conform/POSIX/pthread.h/linknamespace
FAIL: conform/POSIX/sched.h/linknamespace
FAIL: conform/POSIX/time.h/linknamespace
These functions are defined as strong symbols with __bind and
__getsockname as weak aliases. This patch switches this to the other
way round by removing the NO_WEAK_ALIAS definitions and so letting the
default case in socket.S act; I see no reason for the existing
arrangements.
Tested for x86 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).
[BZ #17733]
* sysdeps/unix/sysv/linux/bind.S (NO_WEAK_ALIAS): Do not define.
(__bind): Do not define as weak alias.
* sysdeps/unix/sysv/linux/getsockname.S (NO_WEAK_ALIAS): Do not
define.
(__getsockname): Do not define as weak alias.
Will Newton [Thu, 11 Dec 2014 17:27:34 +0000 (17:27 +0000)]
Require bison 2.7 or newer for regenerating intl/plural.y
The merge of the latest gettext code introduced changes to the yacc
parser source that are incompatible with versions of bison older
than 2.7. Add a configure check for the appropriate versions and
document the requirement in INSTALL.
ChangeLog:
2014-12-22 Will Newton <will.newton@linaro.org>
* manual/install.texi: Document that we require bison 2.7
or above.
* INSTALL: Regenerate.
* configure.ac: Use AC_CHECK_PROG_VER instead of
AC_PATH_PROG when checking for bison and check for
version 2.7 or above.
* configure: Regenerate.
Chris Metcalf [Sun, 21 Dec 2014 21:11:39 +0000 (16:11 -0500)]
tile: separate ffsll from ffs
This avoids a linknamespace failure when ffs is legal
but ffsll is not.
Chris Metcalf [Sun, 21 Dec 2014 21:09:36 +0000 (16:09 -0500)]
tile: remove localplt.data and use generic one again.
With the __tls_get_addr removed, it works for tile.
H.J. Lu [Sun, 21 Dec 2014 17:12:04 +0000 (09:12 -0800)]
Add hidden __tls_get_addr/___tls_get_addr alias
__tls_get_addr/___tls_get_addr is always defined in ld.so. There is
no need to call them via PLT inside ld.so. This patch adds the hidden
__tls_get_addr/___tls_get_addr aliases and calls them directly from
_dl_tlsdesc_dynamic. There is no need to set up the EBX register in
i386 _dl_tlsdesc_dynamic when calling the hidden ___tls_get_addr.
* elf/dl-tls.c (__tls_get_addr): Provide the hidden definition
if not defined.
* sysdeps/i386/dl-tls.h (___tls_get_addr): Provide the hidden
definition.
* sysdeps/i386/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Call the
hidden ___tls_get_addr.
* sysdeps/x86_64/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Call the
hidden __tls_get_addr.
* sysdeps/generic/localplt.data (__tls_get_addr): Removed.
* sysdeps/unix/sysv/linux/i386/localplt.data (___tls_get_addr):
Likewise.
Andreas Schwab [Sun, 21 Dec 2014 14:06:27 +0000 (15:06 +0100)]
m68k: remove @PLTPC from _dl_init call
Andreas Schwab [Sun, 21 Dec 2014 14:05:09 +0000 (15:05 +0100)]
Fix changelog typo
H.J. Lu [Sun, 21 Dec 2014 13:27:31 +0000 (05:27 -0800)]
Remove @PLT from "call _dl_init@PLT" in _dl_start_user
_dl_start_user in ld.so calls the local function _dl_init. There is no
need to go through PLT.
* sysdeps/i386/dl-machine.h (_dl_start_user): Remove @PLT
from "call _dl_init@PLT".
* sysdeps/x86_64/dl-machine.h (_dl_start_user): Likewise.
from "call _dl_init@PLT".
Anders Kaseorg [Thu, 11 Dec 2014 10:33:22 +0000 (05:33 -0500)]
manual: Correct guarantee about pointers compared by qsort()
C99, C11, POSIX, and the glibc implementation do guarantee that the
pointers passed to the qsort comparison function lie within the array.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Chris Metcalf [Sat, 20 Dec 2014 18:56:57 +0000 (13:56 -0500)]
tile: provide localplt.data with __tls_get_addr optional
Chris Metcalf [Sat, 20 Dec 2014 03:46:52 +0000 (22:46 -0500)]
tilegx: fix strstr to build and link better
The two_way_short_needle() routine included from str-two-way.h
is not used, so mark it so to avoid compiler warnings.
Calling strnlen() breaks linknamespace tests, so change it
to __strnlen().
Steve Ellcey [Fri, 19 Dec 2014 22:40:29 +0000 (14:40 -0800)]
Remove trailing white space.
Steve Ellcey [Fri, 19 Dec 2014 22:39:18 +0000 (14:39 -0800)]
2014-12-19 Steve Ellcey <sellcey@imgtec.com>
* sysdeps/mips/addmul_1.S (__mpn_addmul_1): Use mulu/muhu instead
of multu on MIPSr6.
* sysdeps/mips/mul_1.S (__mpn_mul_1): Ditto.
* sysdeps/mips/submul_1.S (__mpn_submul_1): Ditto.
* sysdeps/mips/mips64/addmul_1.S (__mpn_addmul_1): Ditto.
* sysdeps/mips/mips64/mul_1.S (__mpn_mul_1): Ditto.
* sysdeps/mips/mips64/submul_1.S (__mpn_submul_1): Ditto.
Steve Ellcey [Fri, 19 Dec 2014 22:37:44 +0000 (14:37 -0800)]
2014-12-19 Steve Ellcey <sellcey@imgtec.com>
* sysdeps/mips/sys/asm.h (PTR_ADDU): Use addu on mips32r6/mips64r6.
(PTR_ADDIU): Use addiu for mips32r6/mips64r6.
(PTR_SUBU): Use subu for mips32r6/mips64r6.
(PTR_SUBIU): Use subu for mips32r6/mips64r6 (subiu does not exist).
* sysdeps/mips/machine-gmon.h (PTR_ADDU_STRING) Use addu for
mips32r6/mips64r6.
(PTR_SUBU_STRING) Use subu for mips32r6/mips64r6.
Ondřej Bílka [Fri, 19 Dec 2014 22:09:40 +0000 (23:09 +0100)]
Simplify strncat.
We rewrite strncat to use strnlen and malloc calls which simplifies code
an is faster as these functions are better optimized than original code.
David S. Miller [Fri, 19 Dec 2014 21:34:30 +0000 (13:34 -0800)]
Fix soft-fp build warning on sparc about strict aliasing.
* sysdeps/sparc/sparc32/soft-fp/q_neg.c (_Q_neg): Use a union to
access the quad as both a long double and as a series of 4 words.
David S. Miller [Fri, 19 Dec 2014 21:23:40 +0000 (13:23 -0800)]
Fix array bounds warnings in elf_get_dyanmic_info() on sparc with gcc-4.6
* get-dynamic-info.h (elf_get_dynamic_info): Ignore -Warray-bounds for a
link_map->l_info array access.
Chris Metcalf [Fri, 19 Dec 2014 21:36:00 +0000 (16:36 -0500)]
iconvdata/tst-loading: bump up timeout to 10s
Chris Metcalf [Fri, 19 Dec 2014 20:11:04 +0000 (15:11 -0500)]
math: increase timeout for math/atest-*.c
These tests run in the 2-5 second range on tilegx, so just bump
up the timeout to 10 seconds generically.
H.J. Lu [Fri, 19 Dec 2014 16:32:05 +0000 (08:32 -0800)]
Replace -Wno-error with -fno-builtin-lround
Torvald Riegel [Wed, 17 Dec 2014 18:09:04 +0000 (19:09 +0100)]
i386: Move futex functions from lowlevellock.h to lowlevellock-futex.h.
Torvald Riegel [Wed, 17 Dec 2014 17:55:19 +0000 (18:55 +0100)]
Use generic lowlevellock-futex.h in x86_64 lowlevellock.h.
Torvald Riegel [Wed, 17 Dec 2014 22:28:38 +0000 (23:28 +0100)]
sh: Remove custom lowlevellock, barrier, condvar, and rwlock implementations.
H.J. Lu [Fri, 19 Dec 2014 13:37:29 +0000 (05:37 -0800)]
Compile s_llround.c with -Wno-error for x32 build
Since x32 returns 32-bit long int and 64-bit long long int in the
same 64-bit register, we make the 32b-bit lround an alias of the
64-bit llround. Add -Wno-error for x32 build to silence the compiler.
H.J. Lu [Fri, 19 Dec 2014 13:28:06 +0000 (05:28 -0800)]
Replace 1L with (mp_limb_t) 1
X86-64 and x32 use sysdeps/i386/ldbl2mpn.c. res_ptr is a pointer
to mp_limb_t, which is long for i386 and x86-64 and long long for
x32. On x32, I got
../sysdeps/x86_64/../i386/ldbl2mpn.c: In function ‘__mpn_extract_long_double’:
../sysdeps/x86_64/../i386/ldbl2mpn.c:72:4: error: left shift count >= width of type [-Werror]
res_ptr[N - 1] &= ~(1L << ((LDBL_MANT_DIG - 1) % BITS_PER_MP_LIMB));
^
cc1: all warnings being treated as errors
This patch replaces 1L with (mp_limb_t) 1. Verified on x32, i686 and
x86-64 with GCC 4.8.3.
Allan McRae [Thu, 18 Dec 2014 01:01:43 +0000 (11:01 +1000)]
Label CVE-2014-9402 in NEWS
Roland McGrath [Wed, 17 Dec 2014 22:33:28 +0000 (14:33 -0800)]
NPTL: Move fork state variables to initializer files.
Roland McGrath [Wed, 17 Dec 2014 22:07:18 +0000 (14:07 -0800)]
NPTL: Remove gratuitous Linuxisms from gai_misc.h.
Roland McGrath [Wed, 17 Dec 2014 21:22:41 +0000 (13:22 -0800)]
Fix stub __if_freenameindex build error.
Roland McGrath [Wed, 17 Dec 2014 18:41:28 +0000 (10:41 -0800)]
Remove explicit inline on malloc perturb functions.
Joseph Myers [Wed, 17 Dec 2014 18:10:37 +0000 (18:10 +0000)]
Fix profil_counter namespace (bug 17725).
On ARM, where profil_counter is not static, it is brought in by
references to various standard functions, as noted in
<https://sourceware.org/ml/libc-alpha/2014-11/msg00890.html>, although
it is not a standard function itself. I don't know if this also
causes test failures on SPARC, although I see no reason for it not to
do so.
This patch fixes this namespace issue. profil_counter is renamed to
__profil_counter and made a weak alias on ARM and SPARC. Because of
the uses in profil.c / sprofil.c it seems simplest to make the rename
globally, including on the other architectures for which
profil_counter was static and so the change is of no substance. The
variant names profil_counter_* used in sprofil.c are also renamed to
start with __ so that undesired function names do not get exported in
static libc.
As I noted in bug 17726, profil_counter should probably be a compat
symbol on ARM and SPARC, so it wouldn't exist at all in static libc
even as a weak alias. Since defining a compat symbol still requires
an internal name as a target of an alias, this patch still seems
reasonable as an intermediate step towards that goal: it wouldn't be
possible for the function simply to be static profil_counter on ARM
and SPARC with profil_counter also being the exported compat symbol
name, so profil.c / sprofil.c would still need to be prepared to call
the function under another name (here, __profil_counter).
Tested for x86_64 (testsuite, and that stripped installed shared
libraries are unchanged by the patch) and ARM (ABI and linknamespace
tests - this patch reduces the number of linknamespace failures I see
on ARM from 227 to 5, the residue being math.h failures for fe*
functions and for j0l/j1n/jnl/y0l/y1l/ynl aliases).
2014-12-17 Joseph Myers <joseph@codesourcery.com>
[BZ #17725]
* sysdeps/generic/profil-counter.h (profil_counter): Rename to
__profil_counter.
* sysdeps/unix/sysv/linux/hppa/profil-counter.h (profil_counter):
Likewise.
* sysdeps/unix/sysv/linux/i386/profil-counter.h (profil_counter):
Likewise.
* sysdeps/unix/sysv/linux/ia64/profil-counter.h (profil_counter):
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h
(profil_counter): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h
(profil_counter): Likewise.
* sysdeps/unix/sysv/linux/sh/profil-counter.h (profil_counter):
Likewise.
* sysdeps/unix/sysv/linux/tile/profil-counter.h (profil_counter):
Likewise.
* sysdeps/unix/sysv/linux/x86_64/profil-counter.h
(profil_counter): Likewise.
* sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter):
Likewise.
[!__profil_counter] (profil_counter): Define as weak alias of
__profil_counter.
* sysdeps/unix/sysv/linux/sparc/sparc32/profil-counter.h
(profil_counter): Rename to __profil_counter.
[!__profil_counter] (profil_counter): Define as weak alias of
__profil_counter.
* sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h
(profil_counter): Rename to __profil_counter.
[!__profil_counter] (profil_counter): Define as weak alias of
__profil_counter.
* sysdeps/posix/profil.c: Update comment referring to
profil_counter.
(__profil): Use __profil_counter instead of profil_counter.
* sysdeps/posix/sprofil.c (profil_counter): Rename to
__profil_counter. Use __profil_counter_ushort and
__profil_counter_uint in definitions.
(__sprofil): Use __profil_counter_uint and __profil_counter_ushort
instead of profil_counter_uint and profil_counter_ushort.
Joseph Myers [Wed, 17 Dec 2014 18:09:11 +0000 (18:09 +0000)]
Fix resolver inet_* namespace (bug 17722).
Parts of the resolver brought in by pthreads (at least) use inet_*
functions that aren't in the 1995/6 edition of POSIX that introduced
pthreads (or in one case, use __inet_aton which is then defined in the
same file as non-weak inet_addr). This patch fixes this by making the
affected functions into weak alias for __inet_* and using those names
in the problematic resolver code.
Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).
[BZ #17722]
* inet/inet_mkadr.c (inet_makeaddr): Rename to __inet_makeaddr and
define as weak alias of __inet_makeaddr.
* resolv/inet_addr.c (inet_addr): Rename to __inet_addr and define
as weak alias of __inet_addr.
* resolv/inet_pton.c (inet_pton): Rename to __inet_pton and define
as weak alias of __inet_pton. Use libc_hidden_weak.
* include/arpa/inet.h (__inet_pton): Declare. Use
libc_hidden_proto.
(inet_makeaddr): Don't use libc_hidden_proto.
(__inet_makeaddr): Declare. Use libc_hidden_proto.
* resolv/res_init.c (__res_vinit): Use __inet_pton instead of
inet_pton. Use __inet_makeaddr instead of inet_makeaddr.
* conform/Makefile (test-xfail-POSIX/pthread.h/linknamespace):
Remove variable.
(test-xfail-POSIX/sched.h/linknamespace): Likewise.
(test-xfail-POSIX/time.h/linknamespace): Likewise.
Steve Ellcey [Wed, 17 Dec 2014 18:00:37 +0000 (10:00 -0800)]
2014-12-17 Steve Ellcey <sellcey@imgtec.com>
* inet/getnetgrent_r.c: Move while loop to be inside if statement.
Stefan Liebler [Wed, 17 Dec 2014 15:43:34 +0000 (16:43 +0100)]
Get rid of format warning in bug-vfprintf-nargs.c.
Stefan Liebler [Wed, 17 Dec 2014 15:42:51 +0000 (16:42 +0100)]
Get rid of format warning in tst-widetext.c.
Andreas Schwab [Wed, 17 Dec 2014 12:04:07 +0000 (13:04 +0100)]
Fix printf format error
Roland McGrath [Tue, 16 Dec 2014 23:14:03 +0000 (15:14 -0800)]
Use PTR_MANGLE on libgcc unwinder function pointers.
Roland McGrath [Tue, 16 Dec 2014 23:46:00 +0000 (15:46 -0800)]
Revert "Use pragmas rather than makefiles for necessary options for unwind code."
This reverts commit
c324fcfe75c3976ae0b16943df00710e1d0d74f7.
Roland McGrath [Tue, 16 Dec 2014 22:31:24 +0000 (14:31 -0800)]
Use pragmas rather than makefiles for necessary options for unwind code.
Joseph Myers [Tue, 16 Dec 2014 18:31:31 +0000 (18:31 +0000)]
Fix x86_64 memrchr namespace (bug 17719).
On x86_64, memrchr (not a standard function) is defined as a strong
symbol, instead of a weak alias of __memrchr as on other
architectures. This results in linknamespace test failures from the
use of __memrchr from dirname. (Not a conformance issue because of
the mem* reservation, but contrary to glibc conventions.) This patch
makes x86_64 follow other architectures by defining memrchr as a weak
alias.
Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).
[BZ #17719]
* sysdeps/x86_64/memrchr.S (memrchr): Rename to __memrchr and
define as weak alias of __memrchr.
(__memrchr): Do not define as strong alias of memrchr.
* conform/Makefile (test-xfail-XPG4/libgen.h/linknamespace):
Remove variable.
(test-xfail-UNIX98/libgen.h/linknamespace): Likewise.
(test-xfail-XOPEN2K/libgen.h/linknamespace): Likewise.
(test-xfail-XOPEN2K8/libgen.h/linknamespace): Likewise.
Joseph Myers [Tue, 16 Dec 2014 18:18:49 +0000 (18:18 +0000)]
Fix resolver if_* namespace (bug 17717).
Resolver code, brought in by pthreads (at least), uses if_* interfaces
that weren't in POSIX before 2001, resulting in linknamespace
failures. This patch changes those interfaces to be weak aliases of
__if_* and makes the resolver use __if_* directly.
Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by this patch).
[BZ #17717]
* inet/if_index.c (if_nametoindex): Rename to __if_nametoindex and
define as weak alias of __if_nametoindex. Use libc_hidden_weak.
(if_indextoname): Rename to __if_indextoname and define as weak
alias of __if_indextoname. Use libc_hidden_weak.
(if_freenameindex): Rename to __if_freenameindex and define as
weak alias of __if_freenameindex.
(if_nameindex): Rename to __if_nameindex and define as weak alias
of __if_nameindex.
* sysdeps/mach/hurd/if_index.c (if_nametoindex): Rename to
__if_nametoindex and define as weak alias of __if_nametoindex.
Use libc_hidden_weak.
(if_freenameindex): Rename to __if_freenameindex and define as
weak alias of __if_freenameindex.
(if_nameindex): Rename to __if_nameindex and define as weak alias
of __if_nameindex.
(if_indextoname): Rename to __if_indextoname and define as weak
alias of __if_indextoname. Use libc_hidden_weak.
* sysdeps/unix/sysv/linux/if_index.c (if_nametoindex): Rename to
__if_nametoindex and define as weak alias of __if_nametoindex.
Use libc_hidden_weak.
(if_freenameindex): Rename to __if_freenameindex and define as
weak alias of __if_freenameindex. Use libc_hidden_weak.
(if_nameindex_netlink): Use __if_freenameindex instead of
if_freenameindex.
(if_nameindex): Rename to __if_nameindex and define as weak alias
of __if_nameindex. Use libc_hidden_weak.
(if_indextoname): Rename to __if_indextoname and define as weak
alias of __if_indextoname. Use libc_hidden_weak.
* include/net/if.h [!_ISOMAC] (__if_nametoindex): Declare and use
libc_hidden_proto.
[!_ISOMAC] (__if_freenameindex): Likewise.
* resolv/res_init.c (__res_vinit): Use __if_nametoindex instead of
if_nametoindex.
* conform/Makefile (test-xfail-XPG4/grp.h/linknamespace): Remove
variable.
(test-xfail-XPG4/pwd.h/linknamespace): Likewise.
(test-xfail-UNIX98/aio.h/linknamespace): Likewise.
(test-xfail-UNIX98/grp.h/linknamespace): Likewise.
(test-xfail-UNIX98/pthread.h/linknamespace): Likewise.
(test-xfail-UNIX98/pwd.h/linknamespace): Likewise.
(test-xfail-UNIX98/sched.h/linknamespace): Likewise.
(test-xfail-UNIX98/time.h/linknamespace): Likewise.
Joseph Myers [Tue, 16 Dec 2014 16:25:08 +0000 (16:25 +0000)]
Remove some semaphore.h linknamespace XFAILs.
Roland's recent sem_* changes introduced some XPASSes for semaphore.h
linknamespace tests by removing a non-static variable "mountpoint".
This patch removes the XFAILs for the fixed bug.
Tested for x86_64.
* conform/Makefile (test-xfail-UNIX98/semaphore.h/linknamespace):
Remove variable.
(test-xfail-XOPEN2K/semaphore.h/linknamespace): Likewise.
(test-xfail-XOPEN2K8/semaphore.h/linknamespace): Likewise.
Siddhesh Poyarekar [Tue, 16 Dec 2014 14:10:47 +0000 (19:40 +0530)]
Fix the 'array subscript is above array bounds' warning correctly
Use DIAG_IGNORE_NEEDS_COMMENT instead since the compiler should have
seen that NS never goes beyond MAXNS.
Siddhesh Poyarekar [Tue, 16 Dec 2014 11:23:05 +0000 (16:53 +0530)]
Fix 'array subscript is above array bounds' warning in res_send.c
I see this warning in my build on F21 x86_64, which seems to be due to
a weak check for array bounds. Fixed by making the bounds check
stronger.
This is not an actual bug since nscount is never set to anything
greater than MAXNS. The compiler however does not know this, so we
need the stronger bounds check to quieten the compiler.
Arjun Shankar [Tue, 16 Dec 2014 09:51:01 +0000 (15:21 +0530)]
Modify libio/tst-fopenloc.c to use test-skeleton.c
This test would earlier fail when run under test-skeleton.c due to
bug #17522 in 'fputws'. That bug is now fixed and so this test may
be modified.
Arjun Shankar [Tue, 16 Dec 2014 09:49:51 +0000 (15:19 +0530)]
Modify stdlib/tst-bsearch.c to use test-skeleton.c
This test used to define a 'struct entry' that conflicts with the
definition in search.h included in test-skeleton. The struct is
now renamed 'item'.
Arjun Shankar [Tue, 16 Dec 2014 09:48:46 +0000 (15:18 +0530)]
Modify stdio-common/tst-fseek.c to use test-skeleton.c
This test needs a TIMEOUT longer than the default 2 seconds since it
sleeps twice for a second each.
Torvald Riegel [Mon, 15 Dec 2014 19:13:11 +0000 (20:13 +0100)]
Ignore warning in string/tester.c.
Torvald Riegel [Mon, 15 Dec 2014 21:11:56 +0000 (22:11 +0100)]
Fix warning in misc/tst-mntent2.c.
Torvald Riegel [Mon, 15 Dec 2014 21:05:06 +0000 (22:05 +0100)]
Fix warning in elf/tst-unique4lib.cc.
Florian Weimer [Mon, 15 Dec 2014 16:41:13 +0000 (17:41 +0100)]
Avoid infinite loop in nss_dns getnetbyname [BZ #17630]
Allan McRae [Tue, 16 Dec 2014 03:20:25 +0000 (13:20 +1000)]
stdio-common/Makefile: readd bug26 testcase
This testcase was accidentally removed in commit
a5357b7c.
Ondřej Bílka [Mon, 15 Dec 2014 23:09:32 +0000 (00:09 +0100)]
Return allocated array instead of unallocated.
In locale/programs/ld-ctype.c we returned array that was on stack.
Fixed by returning static array instead.
Torvald Riegel [Mon, 15 Dec 2014 21:49:29 +0000 (22:49 +0100)]
Add comments for the generic lowlevellock implementation.
Patch by Bernard Ogden <bernie.ogden@linaro.org>.
Torvald Riegel [Tue, 29 Jul 2014 19:44:58 +0000 (21:44 +0200)]
Fix nptl/tst-sem4: always start with a fresh semaphore.
Torvald Riegel [Mon, 15 Dec 2014 21:09:55 +0000 (22:09 +0100)]
Fix nptl/tst-mutex5.c: Do not skip tests if elision is enabled.
Adhemerval Zanella [Mon, 15 Dec 2014 17:29:09 +0000 (11:29 -0600)]
stdio-common: Include <libc-internal.h> in some tests
This patch adds the missing libc-internal.h include on test-vprintf.c
tst-sprintf.c.
Torvald Riegel [Mon, 8 Dec 2014 17:32:14 +0000 (18:32 +0100)]
Remove custom pthread_once implementation on s390.
Jeff Law [Mon, 15 Dec 2014 09:09:32 +0000 (10:09 +0100)]
CVE-2012-3406: Stack overflow in vfprintf [BZ #16617]
A larger number of format specifiers coudld cause a stack overflow,
potentially allowing to bypass _FORTIFY_SOURCE format string
protection.
Will Newton [Thu, 11 Dec 2014 17:59:45 +0000 (17:59 +0000)]
Bump required version of texinfo to 4.7
It seems we require texinfo 4.7 for the --plaintext option, so
document that and check for the correct version in configure.
ChangeLog:
2014-12-15 Will Newton <will.newton@linaro.org>
* manual/install.texi: Bump required version of texinfo
to 4.7 from 4.5.
* INSTALL: Regenerated.
* configure.ac: Check for makeinfo version 4.7 and above.
* configure: Regenerated.
Roland McGrath [Fri, 12 Dec 2014 21:17:21 +0000 (13:17 -0800)]
NPTL: Refactor named semaphore code to use shm-directory.h
Roland McGrath [Fri, 12 Dec 2014 22:52:14 +0000 (14:52 -0800)]
NPTL: Add stubs for Linux-only extension functions.
Roland McGrath [Fri, 12 Dec 2014 22:00:37 +0000 (14:00 -0800)]
Fix NPTL build for !__ASSUME_SET_ROBUST_LIST case.
Stefan Liebler [Thu, 11 Dec 2014 12:38:01 +0000 (07:38 -0500)]
resolv: Suppress maybe uninitialized warning
In send_vc function at resolv/res_send.c, There is the
following warning on some architectures:
'resplen' may be used uninitialized in this function
[-Wmaybe-uninitialized]
And this is a false positive. This patch suppress the
compiler warning.
Stefan Liebler [Fri, 12 Dec 2014 10:13:09 +0000 (11:13 +0100)]
Get rid of warning comparision will always evaluate as true
James Lemke [Fri, 12 Dec 2014 00:38:15 +0000 (16:38 -0800)]
Fix for test "malloc_usable_size: expected 7 but got 11"
[BZ #17581] Revert this fix while investigating a problem.
Roland McGrath [Thu, 11 Dec 2014 22:15:51 +0000 (14:15 -0800)]
Refactor shm_{open,unlink} code to separate Linux-specific directory choice from POSIX-generic code.
Kaz Kojima [Thu, 11 Dec 2014 23:07:35 +0000 (08:07 +0900)]
* Fix SH specific compiler warnings which are for integer-pointer
type conversions without cast.
Joseph Myers [Thu, 11 Dec 2014 22:58:48 +0000 (22:58 +0000)]
Move semaphore.h to sysdeps/pthread/.
Carlos reported failures in conform/ tests in environments where the
compiler used could only find headers in glibc's source and build
trees, not any previously installed headers
<https://sourceware.org/ml/libc-alpha/2014-09/msg00040.html>.
This patch moves nptl/semaphore.h to sysdeps/pthread/semaphore.h so
that it can be found by builds from all glibc subdirectories; it's not
in any way NPTL-specific. (I left the Makefile setting to install
this header in nptl/, but maybe it should move as well - it's just not
clear to me what ifeq ($(subdir),...) conditional should be used to
select the directory to associate the header with for installation
purposes. The path in the toplevel Makefile used for begin-end-check
also remains hardcoded; it's a known todo issue to rework that test to
run in each subdirectory checking the headers installed from that
subdirectory, rather than a separate hardcoded list.)
Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch). I did *not* test a
configuration such as that in which Carlos saw failure.
* nptl/semaphore.h: Move to ...
* sysdeps/pthread/semaphore.h: ... here.
* Makefile (installed-headers): Change nptl/semaphore.h to
sysdeps/pthread/semaphore.h.
Roland McGrath [Thu, 11 Dec 2014 21:52:57 +0000 (13:52 -0800)]
Suppress -Wformat-security in tst-error1.c.
Roland McGrath [Thu, 11 Dec 2014 21:46:21 +0000 (13:46 -0800)]
Eliminate -Wno-format from printf/scanf tests.
Joseph Myers [Thu, 11 Dec 2014 21:41:30 +0000 (21:41 +0000)]
Add more headers to include/ for conform tests.
Carlos reported failures in conform/ tests in environments where the
compiler used could only find headers in glibc's source and build
trees, not any previously installed headers
<https://sourceware.org/ml/libc-alpha/2014-09/msg00040.html>.
This patch adds wrappers for two of the affected headers to include/,
which is the normal way to make headers visible when building or
testing in directories other than the one containing the header (I
suppose these headers weren't needed in any such directories except
conform/, or other build or test failures would have resulted). I
believe the same issue applies at least to regexp.h and re_comp.h - we
don't currently have conform/ expectations for those, but when such
expectations are added we'll also need to add header wrappers.
Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch). I did *not* test a
configuration such as that in which Carlos saw failure.
* include/cpio.h: New file.
* include/fmtmsg.h: Likewise.
Joseph Myers [Thu, 11 Dec 2014 21:15:08 +0000 (13:15 -0800)]
Clean up localedata tests printf formats, don't use -Wno-format.
Roland McGrath [Thu, 11 Dec 2014 21:08:26 +0000 (13:08 -0800)]
Fix -Wformat-security warnings in posix/regexbug1.c
Chris Metcalf [Thu, 11 Dec 2014 20:13:48 +0000 (15:13 -0500)]
tile: add inhibit_loop_to_libcall to string functions
Without this, on gcc 4.8.2 the built glibc crashes when memcpy
or memset are invoked, since they call themselves recursively.
See commit
85c2e6110c9a01ec for the generic inhibit_loop_to_libcall.
Adhemerval Zanella [Thu, 11 Dec 2014 19:54:22 +0000 (14:54 -0500)]
Fix __sendmmsg prototype guards
Add __USE_GNU guards on 'socket/sys/socket.h' __sendmmsg prototype.
Steve Ellcey [Thu, 11 Dec 2014 18:23:01 +0000 (10:23 -0800)]
* sysdeps/mips/dl-trampoline.c: Modify switch expression to have
integer value instead of boolean.
Steve Ellcey [Thu, 11 Dec 2014 16:14:17 +0000 (08:14 -0800)]
2014-12-11 Steve Ellcey <sellcey@imgtec.com>
* malloc/malloc.c: Fix powerof2 check.
Stefan Liebler [Thu, 11 Dec 2014 16:03:37 +0000 (17:03 +0100)]
Get rid of warning inlining failed in call to maybe_swap_uint32
Stefan Liebler [Thu, 11 Dec 2014 16:02:24 +0000 (17:02 +0100)]
S/390: Get rid of assembler warning value truncated.
Andreas Schwab [Thu, 11 Dec 2014 15:00:49 +0000 (16:00 +0100)]
Constify string parameters
Adhemerval Zanella [Thu, 11 Dec 2014 12:17:11 +0000 (07:17 -0500)]
powerpc: Fix lgammal_r overflow warnings
ldbl-128ibm uses ldbl-128 e_lgammal_r implementation as is, however some
constants definitions overflows for IBM long double range. This patch
suppress the compiler warnings until the ldbl-128ibm implementation is
fixed.
Andreas Schwab [Thu, 11 Dec 2014 11:45:57 +0000 (12:45 +0100)]
Remove obsolete comment
Andreas Schwab [Tue, 4 Mar 2014 12:00:26 +0000 (13:00 +0100)]
Properly handle forced elision in pthread_mutex_trylock (bug 16657)
Andreas Schwab [Thu, 11 Dec 2014 11:33:15 +0000 (12:33 +0100)]
Remove duplication from gconv-modules