about summary refs log tree commit diff
path: root/NEWS
Commit message (Collapse)AuthorAgeFilesLines
* Split __kernel_standard* functions (fixes bug 17724).Joseph Myers2014-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix resolver bind, getsockname namespace (bug 17733).Joseph Myers2014-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Label CVE-2014-9402 in NEWSAllan McRae2014-12-181-2/+3
|
* Fix profil_counter namespace (bug 17725).Joseph Myers2014-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix resolver inet_* namespace (bug 17722).Joseph Myers2014-12-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix x86_64 memrchr namespace (bug 17719).Joseph Myers2014-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix resolver if_* namespace (bug 17717).Joseph Myers2014-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Avoid infinite loop in nss_dns getnetbyname [BZ #17630]Florian Weimer2014-12-161-2/+5
|
* Return allocated array instead of unallocated.Ondřej Bílka2014-12-161-1/+1
| | | | | In locale/programs/ld-ctype.c we returned array that was on stack. Fixed by returning static array instead.
* CVE-2012-3406: Stack overflow in vfprintf [BZ #16617]Jeff Law2014-12-151-5/+8
| | | | | | A larger number of format specifiers coudld cause a stack overflow, potentially allowing to bypass _FORTIFY_SOURCE format string protection.
* Properly handle forced elision in pthread_mutex_trylock (bug 16657)Andreas Schwab2014-12-111-5/+5
|
* intl: Merge with gettext version 0.19.3Will Newton2014-12-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch merges the latest release of gettext into the intl subdirectory. The initial motivation was to include the plural.y changes which enable building with bison 3.0, but the majority of the other changes are merely cosmetic so it seemed like merging the whole directory was simpler than trying to take it piecemeal. The merge was done by copying across the latext gettext code and adding in a few small glibc changes that have been added over the years that seemed beneficial, as well as a couple of small build fixes that should be merged back to gettext. I also reverted the gettext commit: commit 279b57fc367251666f00e8e2b599b83703451afb Author: Bruno Haible <bruno@clisp.org> Date: Fri Jun 14 12:03:49 2002 +0000 Make absolute pathnames inside $LANGUAGE work. As it caused localedata/tst-setlocale3 to fail and it wasn't clear that glibc wanted that behaviour. The merge has dropped many uses of __glibc_likely/unlikely. This is intentional given that it eases merging. It seems to me that the cost of continually rewriting these lines when merging and the risk of adding bugs when doing so outweighs the benefits of using these macros when code is shared with another project. Tested with make check on x86_64. ChangeLog: 2014-12-11 Will Newton <will.newton@linaro.org> Merge gettext 0.19.3 into intl/. This involves a number of cosmetic changes to comments and ANSI function definitions and prototypes throughout all the files. The gettext copyright header is used but with the date ranges taken from the glibc copy. * NEWS: Add gettext merge to 2.21. * intl/bindtextdom.c: Switch to gettext copyright. Use ANSI definitions and prototypes. Use gl_* locking primitives rather than __libc_* ones. Use __builtin_expect rather than __glibc_likely/unlikely. * intl/dcgettext.c: Switch to gettext copyright. Use ANSI definitions and prototypes. * intl/dcigettext.c: Switch to gettext copyright. Use ANSI definitions and prototypes. (INTDIV0_RAISES_SIGFPE): New define. Use gl_* locking primitives rather than __libc_* ones. Include eval-plural.h instead of plural-eval.c. Use __builtin_expect rather than __glibc_likely/unlikely. * intl/dcngettext.c: Switch to gettext copyright. Use ANSI definitions and prototypes. * intl/dgettext.c: Likewise. * intl/dngettext.c: Likewise. * intl/plural-eval.c: Renamed to... * intl/eval-plural.h: ...this. * intl/explodename.c: Switch to gettext copyright. Use ANSI definitions and prototypes. (_nl_explode_name): Use strchr instead of __rawmemchr. * intl/finddomain.c: Switch to gettext copyright. Use ANSI definitions and prototypes. Use gl_* locking primitives rather than __libc_* ones. (_nl_find_domain): Use malloc rather than alloca for allocation of temporary locale name. * intl/gettext.c: Switch to gettext copyright. Use ANSI definitions and prototypes. * intl/gettextP.h: Switch to gettext copyright. Use ANSI definitions and prototypes. Use gl_* locking primitives rather than __libc_* ones. * intl/gmo.h: Switch to gettext copyright. (struct sysdep_string): Move struct segment_pair outside of struct definition. * intl/hash-string.c: Use ANSI definitions and prototypes. * intl/hash-string.h: Switch to gettext copyright. Use ANSI definitions and prototypes. * intl/l10nflist.c: Switch to gettext copyright. Use ANSI definitions and prototypes. (_nl_normalize_codeset): Avoid integer overflow. * intl/loadinfo.h: Switch to gettext copyright. Use ANSI definitions and prototypes. (LIBINTL_DLL_EXPORTED): New define. (PATH_SEPARATOR): New define. * intl/loadmsgcat.c: Switch to gettext copyright. * intl/localealias.c: Switch to gettext copyright. Use ANSI definitions and prototypes. (_nl_expand_alias): Use PATH_SEPARATOR. * intl/ngettext.c: Switch to gettext copyright. Use ANSI definitions and prototypes. * intl/plural-exp.c: Likewise. * intl/plural-exp.h: Switch to gettext copyright. Use ANSI definitions and prototypes. (struct expression): Move definition of enum operator outside of struct definition. * intl/plural.c: Regenerate. * intl/plural.y: Switch to gettext copyright. Use ANSI definitions and prototypes. Port to bison 3.0. * intl/textdomain.c: Switch to gettext copyright. Use ANSI definitions and prototypes. Use gl_* locking primitives rather than __libc_* ones.
* Fix strftime wcschr namespace (bug 17634).Joseph Myers2014-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use of strftime, a C90 function, ends up bringing in wcschr, which is not a C90 function. Although not a conformance bug (C90 reserves wcs*), this is still contrary to glibc practice of avoiding relying on those reservations; this patch arranges for the internal uses to use __wcschr instead, with wcschr being a weak alias. This is more complicated than some such patches because of the various IFUNC definitions of wcschr (which include code redefining libc_hidden_def in a way that involves creating __GI_wcschr manually and so also needs to create __GI___wcschr after the change of internal uses to use __wcschr). Tested for x86_64 and 32-bit x86 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). 2014-12-10 Joseph Myers <joseph@codesourcery.com> Adhemerval Zanella <azanella@linux.vnet.ibm.com> [BZ #17634] * wcsmbs/wcschr.c [!WCSCHR] (wcschr): Define as __wcschr. Undefine after defining function. Define as weak alias of __wcschr. Use libc_hidden_weak. * include/wchar.h (__wcschr): Declare. Use libc_hidden_proto. * sysdeps/i386/i686/multiarch/wcschr-c.c [IS_IN (libc) && SHARED] (libc_hidden_def): Also define __GI___wcschr alias. * sysdeps/i386/i686/multiarch/wcschr.S (wcschr): Rename to __wcschr and define as weak alias of __wcschr. * sysdeps/powerpc/power6/wcschr.c [!WCSCHR] (WCSCHR): Define as __wcschr. [!WCSCHR] (DEFAULT_WCSCHR): Define. [DEFAULT_WCSCHR] (__wcschr): Use libc_hidden_def. [DEFAULT_WCSCHR] (wcschr): Define as weak alias of __wcschr. Use libc_hidden_weak. Do not use libc_hidden_def. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c [IS_IN (libc) && SHARED] (libc_hidden_def): Also define __GI___wcschr alias. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c [IS_IN (libc)] (wcschr): Define as macro expanding to __redirect_wcschr. [IS_IN (libc)] (__wcschr_ppc): Use __redirect_wcschr in typeof. [IS_IN (libc)] (__wcschr_power6): Likewise. [IS_IN (libc)] (__wcschr_power7): Likewise. [IS_IN (libc)] (__libc_wcschr): New. Define with libc_ifunc instead of wcschr. [IS_IN (libc)] (wcschr): Undefine and define as weak alias of __libc_wcschr. [!IS_IN (libc)] (libc_hidden_def): Do not undefine and redefine. * sysdeps/powerpc/powerpc64/multiarch/wcschr.c (wcschr): Rename to __wcschr and define as weak alias of __wcschr. Use libc_hidden_builtin_def. * sysdeps/x86_64/wcschr.S (wcschr): Rename to __wcschr and define as weak alias of __wcschr. Use libc_hidden_weak. * time/alt_digit.c (_nl_get_walt_digit): Use __wcschr instead of wcschr. * time/era.c (_nl_init_era_entries): Likewise. * conform/Makefile (test-xfail-ISO/time.h/linknamespace): Remove variable. (test-xfail-XPG3/time.h/linknamespace): Likewise. (test-xfail-XPG4/time.h/linknamespace): Likewise.
* manual: Remove incorrect claim that qsort() can be stabilizedAnders Kaseorg2014-12-101-6/+6
| | | | | | | | | | | | Under certain conditions on the size of the array and its items, qsort() may fall back to an in-place quicksort if it cannot allocate memory for a temporary array with malloc(). This algorithm is not a stable sort even if the comparison function is written in the described manner. Fixes #10672. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
* Update NEWSAndreas Schwab2014-12-101-6/+6
|
* Use -Werror by default, add --disable-werror.Joseph Myers2014-12-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed starting at <https://sourceware.org/ml/libc-alpha/2014-11/msg00323.html>, this patch makes the glibc build use -Werror by default to avoid accidentally adding new warnings to the build. The configure option --disable-werror can be used to disable this. -Wno-error=undef is temporarily used because the build isn't clean regarding -Wundef warnings. The idea is that once the remaining -Wundef warnings have been cleaned up (in at least one configuration), -Wno-error=undef will be removed. I get a clean build and test on x86_64 (GCC 4.9 branch) with this patch. The expectation is that this may well break the build for some other configurations, and people seeing such breakage should make appropriate fixes to fix or suppress the warnings for their configurations. In some cases that may involve using pragmas as the right fix (I think that will be right for the -Wno-inline issue for MIPS I referred to in <https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, for example), in some cases -Wno-error in sysdeps makefiles (__restore_rt in MIPS sigaction, for example), in some cases substantive fixes for the warnings. Note that if, with a view to listing all the warnings then fixing them all, you just look for "warning:" in output from building and testing with --disable-werror, you'll see lots of warnings from the linker about functions such as tmpnam. Those warnings can be ignored - only compiler warnings are relevant to -Werror, not linker warnings. * configure.ac (--disable-werror): New configure option. (enable_werror): New AC_SUBST. * configure: Regenerated. * config.make.in (enable-werror): New variable. * Makeconfig [$(enable-werror) = yes] (+gccwarn): Add -Werror -Wno-error=undef. (+gccwarn-c): Do not use -Werror=implicit-function-declaration. * manual/install.texi (Configuring and compiling): Document --disable-werror. * INSTALL: Regenerated. * debug/Makefile (CFLAGS-tst-chk1.c): Add -Wno-error. (CFLAGS-tst-chk2.c): Likewise. (CFLAGS-tst-chk3.c): Likewise. (CFLAGS-tst-chk4.cc): Likewise. (CFLAGS-tst-chk5.cc): Likewise. (CFLAGS-tst-chk6.cc): Likewise. (CFLAGS-tst-lfschk1.c): Likewise. (CFLAGS-tst-lfschk2.c): Likewise. (CFLAGS-tst-lfschk3.c): Likewise. (CFLAGS-tst-lfschk4.cc): Likewise. (CFLAGS-tst-lfschk5.cc): Likewise. (CFLAGS-tst-lfschk6.cc): Likewise.
* Fix pthreads getrlimit, gettimeofday namespace (bug 17682).Joseph Myers2014-12-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some pthreads functions use getrlimit and gettimeofday, but these functions are XSI, not base POSIX; this is a namespace issue for dynamic linking as well as static linking. This patch makes them use __getrlimit and __gettimeofday instead - the former needed to be newly exported from libc.so at GLIBC_PRIVATE (and so now needs libc_hidden_proto / libc_hidden_def), the latter was already exported. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17682] * resource/Versions (libc): Add __getrlimit at GLIBC_PRIVATE. * resource/getrlimit.c (__getrlimit): Use libc_hidden_def. * sysdeps/mach/hurd/getrlimit.c (__getrlimit): Likewise. * include/sys/resource.h (__getrlimit): Use libc_hidden_proto. * nptl/nptl-init.c (__pthread_initialize_minimal_internal): Use __getrlimit instead of getrlimit. * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait): Use __gettimeofday instead of gettimeofday. * nptl/pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise. * nptl/pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise. * sysdeps/pthread/aio_misc.c (handle_fildes_io): Likewise. * conform/Makefile (test-xfail-POSIX2008/aio.h/linknamespace): Remove variable. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise.
* Reset cached offset when reading to end of stream (BZ #17653)Siddhesh Poyarekar2014-12-041-1/+1
| | | | | | POSIX allows applications to switch file handles when a read results in an end of file. Unset the cached offset at this point so that it is queried again.
* ftell: seek to end only when there are unflushed bytes (BZ #17647)Siddhesh Poyarekar2014-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we seek to end of file if there are unflushed writes or the stream is in write mode, to get the current offset for writing in append mode, which is the end of file. The latter case (i.e. stream is in write mode, but no unflushed writes) is unnecessary since it will only happen when the stream has just been flushed, in which case the recorded offset ought to be reliable. Removing that case lets ftell give the correct offset when it follows an ftruncate. The latter truncates the file, but does not change the file position, due to which it is permissible to call ftell without an intervening fseek call. Tested on x86_64 to verify that the added test case fails without the patch and succeeds with it, and that there are no additional regressions due to it. [BZ #17647] * libio/fileops.c (do_ftell): Seek only when there are unflushed writes. * libio/wfileops.c (do_ftell_wide): Likewise. * libio/tst-ftell-active-handler.c (do_ftruncate_test): New test case. (do_one_test): Call it.
* Fix getifaddrs, freeifaddrs namespace (bug 17668).Joseph Myers2014-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various objects in glibc bring in ifaddrs.o (via references to __netlink_*) and thereby getifaddrs and freeifaddrs, which are not part of any standard supported by glibc. These should be weak aliases of __getifaddrs and __freeifaddrs; this patch makes them so. (The path by which these functions are brought in is Linux-specific, but it seems less confusing to make all versions of these functions weak aliases rather than only the Linux-specific versions that definitely need it.) Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by this patch). [BZ #17668] * inet/ifaddrs.c (getifaddrs): Rename to __getifaddrs and define as weak alias of __getifaddrs. Use libc_hidden_weak. (freeifaddrs): Rename to __freeifaddrs and define as weak alias of __freeifaddrs. Use libc_hidden_weak. * sysdeps/gnu/ifaddrs.c (getifaddrs): Rename to __getifaddrs and define as weak alias of __getifaddrs. Use libc_hidden_weak. (freeifaddrs): Rename to __freeifaddrs and define as weak alias of __freeifaddrs. Use libc_hidden_weak. * sysdeps/unix/sysv/linux/ifaddrs.c (getifaddrs): Rename to __getifaddrs and define as weak alias of __getifaddrs. Use libc_hidden_weak. (freeifaddrs): Rename to __freeifaddrs and define as weak alias of __freeifaddrs. Use libc_hidden_weak. * conform/Makefile (test-xfail-XOPEN2K/net/if.h/linknamespace): Remove variable. (test-xfail-POSIX2008/net/if.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/net/if.h/linknamespace): Likewise.
* mips: Do not use jal to reach __libc_start_mainPetar Jovanovic2014-12-021-1/+1
| | | | | | | | | | | | Since __libc_start_main may not be in the same 256MB-aligned region as the function __start, replace use of jal instruction with la/jalr. This fixes linker issue reported in: https://sourceware.org/bugzilla/show_bug.cgi?id=17601 [BZ #17601] * sysdeps/mips/start.S (__start): Use indirect jump to call __libc_start_main.
* Remove excess declarations from unistd.h for XPG3/XPG4 (bug 17665).Joseph Myers2014-12-021-1/+1
| | | | | | | | | | | | | | | | | | For XPG3/XPG4 (defined __USE_XOPEN && !defined __USE_UNIX98), unistd.h declares many functions that should only be declared for __USE_MISC (none of them are in XPG3/XPG4): sethostname sethostid getdomainname setdomainname vhangup revoke profil acct getusershell endusershell setusershell daemon. The whole block with the [__USE_MISC || (__USE_XOPEN && !__USE_UNIX98)] conditional contains only functions that are not in XPG3/XPG4, so this patch simply changes the conditional. Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by this patch). [BZ #17665] * posix/unistd.h [__USE_MISC || (__USE_XOPEN && !__USE_UNIX98)]: Change conditional to [__USE_MISC].
* Fix fgets_unlocked namespace issues (bug 17664).Joseph Myers2014-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various POSIX functions bring in res_init.o, res_hconf.o or mntent_r.o, which use fgets_unlocked, which is not a POSIX function. This patch arranges for them to use __fgets_unlocked instead. (The IS_IN (libc) conditional in rec_hconf.c is needed because that file is also used in nscd.) Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch except for an assertion line number). Note that most of the linknamespace tests that failed because of fgets_unlocked from the resolver also fail because of other symbols brought in by the resolver, so the number of XFAILs this removes is limited. Also note that fgets_unlocked failures for unistd.h for XPG3/XPG4 showed up that actually unistd.h is declaring too much for XPG3/XPG4 (bug 17665) - there is no actual need to make getusershell.c use __fgets_unlocked (at least as regards formal standards are concerned; maybe it should still change for namespace-cleanness of _DEFAULT_SOURCE) because the functions there aren't actually in any of the supported standards; the correct fix for those failures will be to stop the *usershell* functions appearing in unistd.h for XPG3/XPG4. [BZ #17664] * misc/mntent_r.c (__getmntent_r): Use __fgets_unlocked instead of fgets_unlocked. * resolv/res_hconf.c [IS_IN (libc)] (fgets_unlocked): Define to __fgets_unlocked. * resolv/res_init.c (__res_vinit): Use __fgets_unlocked instead of fgets_unlocked. * conform/Makefile (test-xfail-XPG4/sys/statvfs.h/linknamespace): Remove variable. (test-xfail-POSIX/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/mman.h/linknamespace): Likewise. (test-xfail-UNIX98/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K/sys/statvfs.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/mman.h/linknamespace): Likewise. (test-xfail-POSIX2008/sys/statvfs.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/mman.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/sys/statvfs.h/linknamespace): Likewise.
* Fix for test "malloc_usable_size: expected 7 but got 11"James Lemke2014-12-011-2/+2
| | | | | | [BZ #17581] The checking chain of unused chunks was terminated by a hash of the block pointer, which was sometimes confused with the chunk length byte. The chain is now terminated by a NULL byte.
* Update NEWS for previous two commitsSiddhesh Poyarekar2014-12-011-5/+5
|
* Mention fix for PR 13862H.J. Lu2014-11-281-4/+5
|
* FIx ldbl-128ibm frexpl for 32-bit systems (bug 16619, bug 16740).Joseph Myers2014-11-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | This patch fixes bugs in ldbl-128ibm frexpl for 32-bit systems shown up by warnings: ../sysdeps/ieee754/ldbl-128ibm/s_frexpl.c:82:4: warning: left shift count >= width of type ../sysdeps/ieee754/ldbl-128ibm/s_frexpl.c:129:5: warning: left shift count >= width of type This did in fact show up in test-ldouble.out (alongside all the other problems there ... maybe we should again consider running the libm tests at finer granularity from the makefiles) as already covered by the testsuite after the previous patch that fixed these bugs for 64-bit systems. The fix is simply using 1LL instead of 1L when shifting by 52. Tested for powerpc32 (soft float). [BZ #16619] [BZ #16740] * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c (__frexpl): Use 1LL << 52 instead of 1L << 52.
* Update NEWS for bug 17608Florian Weimer2014-11-241-1/+1
|
* Fix perror fileno namespace (bug 17633).Joseph Myers2014-11-241-1/+1
| | | | | | | | | | | | | | | | perror, an ISO C function, uses fileno, which is not an ISO C function. This patch makes it use __fileno instead. (The nearby call to fdopen is not a problem because that's #defined to _IO_new_fdopen.) Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by this patch). [BZ #17633] * stdio-common/perror.c (perror): Call __fileno instead of fileno. * conform/Makefile (test-xfail-ISO/stdio.h/linknamespace): Remove variable. (test-xfail-ISO99/stdio.h/linknamespace): Likewise. (test-xfail-ISO11/stdio.h/linknamespace): Likewise.
* BZ#16469: don't drop trailing dot in res_nquerydomain(..., name, NULL, ...)Alexandre Oliva2014-11-211-4/+4
| | | | | | | | | | | | | | | | If we drop it here, we will fail to detect a duplicate trailing dot later on. Retaining, OTOH, has no ill effects whatsoever, and it even saves us the trouble of copying the domain name minus the trailing dot, like we used to do. for ChangeLog [BZ #16469] * NEWS: Update. * resolv/res_query.c (__libc_res_nquerydomain): Retain trailing dot. * posix/tst-getaddrinfo5.c: New. * posix/Makefile (tests): Add it.
* BZ#14498: fix infinite loop in nss_db_getservbynameAlexandre Oliva2014-11-211-4/+4
| | | | | | | | | | | | | | | | nss_db uses nss_files code for services, but a continue on protocol mismatch that doesn't affect nss_files skipped the code that advanced to the next db entry. Any one of these changes would suffice to fix it, but fixing both makes them both safer to reuse elsewhere. for ChangeLog [BZ #14498] * NEWS: Fixed. * nss/nss_db/db-XXX.c (_nss_db_get##name##_r): Update hidx after parsing line but before break_if_match. * nss/nss_files/files-service (DB_LOOKUP): Don't "continue;" if there is a protocol mismatch.
* CVE-2014-7817: wordexp fails to honour WRDE_NOCMD.Carlos O'Donell2014-11-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The function wordexp() fails to properly handle the WRDE_NOCMD flag when processing arithmetic inputs in the form of "$((... ``))" where "..." can be anything valid. The backticks in the arithmetic epxression are evaluated by in a shell even if WRDE_NOCMD forbade command substitution. This allows an attacker to attempt to pass dangerous commands via constructs of the above form, and bypass the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD in exec_comm(), the only place that can execute a shell. All other checks for WRDE_NOCMD are superfluous and removed. We expand the testsuite and add 3 new regression tests of roughly the same form but with a couple of nested levels. On top of the 3 new tests we add fork validation to the WRDE_NOCMD testing. If any forks are detected during the execution of a wordexp() call with WRDE_NOCMD, the test is marked as failed. This is slightly heuristic since vfork might be used in the future, but it provides a higher level of assurance that no shells were executed as part of command substitution with WRDE_NOCMD in effect. In addition it doesn't require libpthread or libdl, instead we use the public implementation namespace function __register_atfork (already part of the public ABI for libpthread). Tested on x86_64 with no regressions.
* Fix libm mpone, mptwo namespace (bug 17616).Joseph Myers2014-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libm uses symbols mpone and mptwo for internal purposes. This patch moves them to the implementation namespace (__mpone and __mptwo). Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #17616] * sysdeps/ieee754/dbl-64/mpa.c (mpone): Rename to __mpone. (mptwo): Rename to __mptwo. (__inv): Use __mptwo instead of mptwo. * sysdeps/ieee754/dbl-64/mpa.h (mpone): Rename to __mpone. (mptwo): Rename to __mptwo. * sysdeps/ieee754/dbl-64/mpatan.c (__mpatan): Use __mpone instead of mpone and __mptwo instead of mptwo. * sysdeps/ieee754/dbl-64/mpatan2.c (__mpatan2): Use __mpone instead of mpone. * sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Likewise. * sysdeps/ieee754/dbl-64/mplog.c (__mplog): Likewise. * sysdeps/ieee754/dbl-64/sincos32.c (__c32): Use __mpone instead of mpone and __mptwo instead of mptwo. (__mpranred): Use __mpone instead of mpone. * conform/Makefile (test-xfail-ISO/math.h/linknamespace): Remove variable. (test-xfail-ISO99/complex.h/linknamespace): Likewise. (test-xfail-ISO99/math.h/linknamespace): Likewise. (test-xfail-ISO99/tgmath.h/linknamespace): Likewise. (test-xfail-ISO11/complex.h/linknamespace): Likewise. (test-xfail-ISO11/math.h/linknamespace): Likewise. (test-xfail-ISO11/tgmath.h/linknamespace): Likewise. (test-xfail-XPG3/math.h/linknamespace): Likewise. (test-xfail-XPG4/math.h/linknamespace): Likewise. (test-xfail-POSIX/math.h/linknamespace): Likewise. (test-xfail-UNIX98/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K/tgmath.h/linknamespace): Likewise. (test-xfail-POSIX2008/complex.h/linknamespace): Likewise. (test-xfail-POSIX2008/math.h/linknamespace): Likewise. (test-xfail-POSIX2008/tgmath.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/complex.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/math.h/linknamespace): Likewise. (test-xfail-XOPEN2K8/tgmath.h/linknamespace): Likewise.
* Remove sigvec.Roland McGrath2014-11-141-0/+5
|
* Require GCC 4.6 or later to build glibc.Joseph Myers2014-11-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | As discussed in the thread starting at <https://sourceware.org/ml/libc-alpha/2014-10/msg00792.html>, and continuing into November, this patch increases the minimum GCC version for building glibc to 4.6 (there seemed to be no clear consensus for 4.7). In particular, this allows us to use #pragma GCC diagnostic for fine-grained warning control with -Werror (subject to establishing a suitable policy for that use). The documentation has a statement, as requested, about the most recent GCC version tested for building glibc, and I've updated <https://sourceware.org/glibc/wiki/Release> to refer to updating that statement. A NEWS entry is added for this change, although previous such changes didn't get them. Tested for x86_64 (testsuite, and that installed shared libraries are unchanged by this patch). * configure.ac (libc_cv_compiler_ok): Require GCC 4.6 or later. * configure: Regenerated. * manual/install.texi (Tools for Compilation): Document a requirement of GCC 4.6 or later and that GCC 4.9 is the newest compiler verified to work. * INSTALL: Regenerated.
* Fix strtoll / strtoull namespace for 32-bit (bug 17594).Joseph Myers2014-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For 32-bit platforms, strtoll and strtoull are strong symbols in libc, but they are not in ISO C90, and are brought in by references to __strtoll_internal / __strtoull_internal from scanf. (For 64-bit platforms, they are properly weak.) This patch makes them weak for 32-bit (it has a side-effect of making other symbols weak that don't need to be weak, such as strtol, but that's harmless). Tested for x86 (testsuite, and that the disassembly of installed shared libraries is unchanged by the patch). This fixes all 120 unXFAILed FAILs of the new linknamespace tests seen for x86 (in fact, there are now seven XPASSes of those tests for x86 XPASS: conform/POSIX2008/fcntl.h/linknamespace XPASS: conform/UNIX98/libgen.h/linknamespace XPASS: conform/XOPEN2K/fcntl.h/linknamespace XPASS: conform/XOPEN2K/libgen.h/linknamespace XPASS: conform/XOPEN2K8/fcntl.h/linknamespace XPASS: conform/XOPEN2K8/libgen.h/linknamespace XPASS: conform/XPG4/libgen.h/linknamespace so suggesting that the failures seen for those on x86_64 are in some way architecture-specific or 64-bit-specific). [BZ #17594] * stdlib/strtol.c (SYM__): New macro. (SYM__1): Likewise. (__strtol): Likewise. (strtol): Rename to __strtol and define as weak alias of __strtol. Use libc_hidden_weak.
* Fix localealias.c fgets_unlocked namespace (bug 17589).Joseph Myers2014-11-121-1/+2
| | | | | | | | | | | | | intl/localealias.c is brought in by ISO C functions, but uses fgets_unlocked, which is not an ISO C function. This patch changes this to use __fgets_unlocked. Tested for x86_64 (testsuite, and that stripped installed shared libraries are unchanged by the patch). [BZ #17589] * intl/localealias.c [_LIBC] (FGETS): Use __fgets_unlocked instead of fgets_unlocked.
* Fix locale memmem namespace (bug 17585).Joseph Myers2014-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Locale code, brought in by ISO C functions, calls memmem, which is not an ISO C function. This isn't an ISO C conformance bug, because all mem* names are reserved, but glibc practice is not to rely on that reservation (thus, memmem is only declared in string.h if __USE_GNU even though ISO C would allow it to be declared unconditionally, for example). This patch changes that code to use __memmem. Note: there are uses of memmem elsewhere in glibc that I didn't change, although it may turn out some of those also need to use __memmem. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by this patch). [BZ #17585] * string/memmem.c [!_LIBC] (__memmem): Define to memmem. (memmem): Rename to __memmem and define as weak alias of __memmem. Use libc_hidden_weak. (__memmem): Use libc_hidden_def. * include/string.h (__memmem): Declare. Use libc_hidden_proto. * locale/findlocale.c (valid_locale_name): Use __memmem instead of memmem.
* Fix __get_nprocs fgets_unlocked namespace (bug 17582).Joseph Myers2014-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __get_nprocs is called from malloc code, but calls fgets_unlocked, which is not an ISO C or POSIX function. This patch fixes it to call a new __fgets_unlocked name instead. Note: there are various other uses of fgets_unlocked in glibc's libraries, and I haven't yet investigated which others might also be problematic (called directly or indirectly from standard functions) and so need to change to use __fgets_unlocked. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17582] * libio/iofgets.c [weak_alias && !_IO_MTSAFE_IO] (__fgets_unlocked): Add alias of _IO_fgets. Use libc_hidden_def. * libio/iofgets_u.c (fgets_unlocked): Rename to __fgets_unlocked and define as weak alias of __fgets_unlocked. Use libc_hidden_weak. (__fgets_unlocked): Use libc_hidden_def. * include/stdio.h (__fgets_unlocked): Declare. Use libc_hidden_proto. * sysdeps/unix/sysv/linux/getsysstats.c (phys_pages_info): Use __fgets_unlocked instead of fgets_unlocked. * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_CONF_PARSER): Likewise. * sysdeps/unix/sysv/linux/sparc/getsysstats.c (GET_NPROCS_CONF_PARSER): Likewise.
* Fix __printf_fp wmemset namespace (bug 17574).Joseph Myers2014-11-121-1/+1
| | | | | | | | | | | | | | | | | __printf_fp calls wmemset, but that is not an ISO C90 function. This patch fixes it to call a new __wmemset name instead (with wmemset being a weak alias). Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17574] * wcsmbs/wmemset.c (wmemset): Rename to __wmemset and define as weak alias of __wmemset. Use libc_hidden_weak. (__wmemset): Use libc_hidden_def. * include/wchar.h (__wmemset): Declare. Use libc_hidden_proto. * stdio-common/printf_fp.c (___printf_fp): Call __wmemset instead of wmemset.
* Fix stpcpy / mempcpy namespace (bug 17573).Joseph Myers2014-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various glibc functions call __stpcpy and __mempcpy for namespace reasons instead of plain stpcpy and mempcpy. But __stpcpy and __mempcpy are macros that call __builtin_stpcpy and __builtin_mempcpy, and unless GCC optimizes the calls, they end up calling the C functions stpcpy and mempcpy. For calls from within shared libc, libc_hidden_builtin_proto ensures that calls to those C functions are in turn mapped to call __GI_stpcpy and __GI_mempcpy. However, for static libc, and for calls from shared libraries other than libc, the ELF symbols stpcpy and mempcpy end up getting called, breaking the ISO C namespace (in the case of stpcpy) or glibc conventions about not relying on the "future library directions" reservations (in the case of mempcpy). This patch fixes this by adding declarations of these functions to include/string.h, under an appropriate condition, with __asm__ used to change the assembler name used for calls (the mempcpy case was previously discussed, and the approach for the fix is as I suggested in <https://sourceware.org/ml/libc-alpha/2013-02/msg00063.html>). Tested for x86_64 with the testsuite; also checked that dcigettext.o (an example previously noted of undesired calls to stpcpy and mempcpy) now calls __stpcpy and __mempcpy instead, as do non-libc shared libraries (__stpcpy and __mempcpy were already exported from shared libc). Disassembly of installed shared libraries isn't easy to compare because of reordered PLT entries resulting from the change in functions called (libnsl, libnss_compat, libnss_dns, libnss_files, libnss_hesiod, libnss_nis, libnss_nisplus, libpthread, librt all have such changes). [BZ #17573] * include/string.h [NOT_IN_libc || !SHARED] (mempcpy): Declare with asm name __mempcpy. [NOT_IN_libc || !SHARED] (stpcpy): Declare with asm name __stpcpy.
* Fix x86_64 rawmemchr namespace (bug 17572).Joseph Myers2014-11-121-1/+1
| | | | | | | | | | | | | | | | rawmemchr is not an ISO C function, but __rawmemchr is called from ISO C functions, so rawmemchr should be a weak alias. On most architecture it is, but x86_64 defines the function as rawmemchr with __rawmemchr as a strong alias. This patch makes x86_64 follow the same arrangements as other architectures. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17572] * sysdeps/x86_64/rawmemchr.S (rawmemchr): Rename to __rawmemchr and define as weak alias of __rawmemchr. (__rawmemchr): Do not define as strong alias of rawmemchr.
* Fix qsort_r namespace (bug 17571).Joseph Myers2014-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | qsort_r is defined in the same file as qsort, but is not an ISO C function, so should be a weak alias for __qsort_r. The uses in getaddrinfo should also call __qsort_r, since getaddrinfo is a POSIX function and qsort_r isn't. This patch implements this. Because nscd uses the getaddrinfo sources outside libc, as do the tst-rfc3484 tests, a #define of __qsort_r to qsort_r is added there alongside the similar defines for other libc-internal symbols used in getaddrinfo. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17571] * stdlib/msort.c (qsort_r): Rename to __qsort_r and define as weak alias of __qsort_r. (qsort): Call __qsort_r instead of qsort_r. * include/stdlib.h (qsort_r): Do not call libc_hidden_proto. (__qsort_r): Declare. Call libc_hidden_proto. * sysdeps/posix/getaddrinfo.c (getaddrinfo): Call __qsort_r instead of qsort_r. * nscd/gai.c (__qsort_r): Define to qsort_r. * posix/tst-rfc3484.c (__qsort_r): Likewise. * posix/tst-rfc3484-2.c (__qsort_r): Likewise. * posix/tst-rfc3484-3.c (__qsort_r): Likewise.
* Fix malloc_info namespace (bug 17570).Joseph Myers2014-11-121-1/+1
| | | | | | | | | | | | | malloc_info is defined in the same file as malloc and free, but is not an ISO C function, so should be a weak symbol. This patch makes it so. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17570] * malloc/malloc.c (malloc_info): Rename to __malloc_info and define as weak alias of __malloc_info.
* Fix __getcwd rewinddir namespace (bug 17584).Joseph Myers2014-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __getcwd is called from dcigettext.o (brought in by various ISO C functionality), but calls rewinddir, which is not an ISO C function. This patch makes __getcwd call __rewinddir instead and makes rewinddir a weak alias for __rewinddir. Since getcwd.c is shared with gnulib (albeit not merged in either direction for a long time, and omitted from gnulib's config/srclist.txt list of shared files) I put in a #ifndef _LIBC define of __rewinddir to rewinddir, although a future merged version of getcwd could end up looking significantly different. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by this patch). [BZ #17584] * dirent/rewinddir.c (rewinddir): Rename to __rewinddir and define as weak alias of __rewinddir. Don't use libc_hidden_def. (__rewinddir): Use libc_hidden_def. * sysdeps/mach/hurd/rewinddir.c: Rename to __rewinddir and define as weak alias of __rewinddir. Don't use libc_hidden_def. (__rewinddir): Use libc_hidden_def. * sysdeps/posix/rewinddir.c: Rename to __rewinddir and define as weak alias of __rewinddir. Don't use libc_hidden_def. (__rewinddir): Use libc_hidden_def. * include/dirent.h (rewinddir): Don't use libc_hidden_proto. (__rewinddir): Use libc_hidden_proto. * sysdeps/posix/getcwd.c [!_LIBC] (__rewinddir): Define to rewinddir. (__getcwd): Use __rewinddir instead of rewinddir.
* Fix tzfile.c namespace (bug 17583).Joseph Myers2014-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tzfile.c is brought in by various ISO C functions, but calls fileno, fread_unlocked and ftello, which are not ISO C functions. This patch adds names __fileno, __fread_unlocked and __ftello for those functions, making tzfile.c use those new names. Note: there are various uses of fileno elsewhere in glibc that I didn't change, although it may turn out that some of those also need to use __fileno. Tested for x86_64 with the glibc testsuite. Changed line numbers in tzfile.c cause changes in assertions, and for some reason this ends up with different instruction choice and register allocation, affecting the size of __tzfile_read and so making comparison of disassembly for libc.so problematic. [BZ #17583] * libio/fileno.c (fileno): Rename to __fileno and define as weak alias of __fileno. Use libc_hidden_weak. (__fileno): Use libc_hidden_def. [weak_alias] (fileno_unlocked): Define as weak alias of __fileno. * libio/ftello.c (ftello): Rename to __ftello and define as weak alias of __ftello. [__OFF_T_MATCHES_OFF64_T] (ftello64): Define as weak alias of __ftello. * libio/iofread.c [weak_alias && !_IO_MTSAFE_IO] (__fread_unlocked): Define as strong alias of _IO_fread. Use libc_hidden_def. (fread_unlocked): Don't use libc_hidden_ver. * libio/iofread_u.c (fread_unlocked): Rename to __fread_unlocked and define as weak alias of __fread_unlocked. Don't use libc_hidden_def. (__fread_unlocked): Use libc_hidden_def. * include/stdio.h (__fileno): Declare. Use libc_hidden_proto. (ftello): Don't use libc_hidden_proto. (__ftello): Declare. Use libc_hidden_proto. (fread_unlocked): Don't use libc_hidden_proto. (__fread_unlocked): Declare. Use libc_hidden_proto. * time/tzfile.c (__tzfile_read): Use __fileno, __fread_unlocked and __ftello instead of fileno, fread_unlocked and ftello.
* Fix tst-strcoll-overflow returning before timeout (BZ #17506)Leonhard Holz2014-11-121-1/+2
| | | | | | | Modifies the test examination in test-skeleton.c so that a test can be successful if it is interrupted or it returns uninterrupted with the expected status. For this both EXPECTED_SIGNAL and EXPECTED_STATUS have to be set, as is done in tst-strcoll-overflow.c.
* New Bhilodi and Tulu locales (BZ #17475)Tatiana Udalova2014-11-121-1/+3
|
* [AArch64] End frame record chain correctly.Renlin Li2014-11-111-1/+1
|
* Remove INTDEF / INTUSE / INTVARDEF (bug 14132).Joseph Myers2014-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completing the removal of the obsolete INTDEF / INTUSE mechanism, this patch removes the final use - that for _dl_starting_up - replacing it by rtld_hidden_def / rtld_hidden_proto. Having removed the last use, the mechanism itself is also removed. Tested for x86_64 that installed stripped shared libraries are unchanged by the patch. (This is not much of a test since this variable is only defined and used in the !HAVE_INLINED_SYSCALLS case.) [BZ #14132] * include/libc-symbols.h (INTUSE): Remove macro. (INTDEF): Likewise. (INTVARDEF): Likewise. (_INTVARDEF): Likewise. (INTDEF2): Likewise. (INTVARDEF2): Likewise. * elf/rtld.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Use rtld_hidden_def instead of INTVARDEF. * sysdeps/generic/ldsodefs.h [IS_IN_rtld] (_dl_starting_up_internal): Remove declaration. (_dl_starting_up): Use rtld_hidden_proto. * elf/dl-init.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Remove declaration. [!HAVE_INLINED_SYSCALLS] (_dl_starting_up_internal): Likewise. (_dl_init) [!HAVE_INLINED_SYSCALLS]: Don't use INTUSE with _dl_starting_up. * elf/dl-writev.h (_dl_writev): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h [!HAVE_INLINED_SYSCALLS] (DL_STARTING_UP_DEF): Use __GI__dl_starting_up instead of _dl_starting_up_internal.