glibc:roland/Wshadow

Last commit made on 2014-10-13
Get this branch:
git clone -b roland/Wshadow https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
roland/Wshadow
Repository:
lp:glibc

Recent commits

5354438... by Roland McGrath <email address hidden>

foo

fcb32af... by Joseph Myers <email address hidden>

Remove CANCEL-FCT-WAIVE and CANCEL-FILE-WAIVE.

As far as I can tell, CANCEL-FCT-WAIVE and CANCEL-FILE-WAIVE are old
notes from the addition of cancellation support to glibc and are not
currently used by any glibc testcases or otherwise in the build
process, and it does not seem useful to me to keep them around. This
patch removes them.

Tested for x86_64.

 * CANCEL-FCT-WAIVE: Remove file.
 * CANCEL-FILE-WAIVE: Likewise.

6bc6bd3... by Joseph Myers <email address hidden>

Don't use INTVARDEF/INTUSE with __libc_enable_secure (bug 14132).

Continuing the removal of the obsolete INTDEF / INTVARDEF / INTUSE
mechanism, this patch replaces its use for __libc_enable_secure with
the use of rtld_hidden_data_def and rtld_hidden_proto.

Tested for x86_64 that installed stripped shared libraries are
unchanged by the patch.

 [BZ #14132]
 * elf/dl-sysdep.c (__libc_enable_secure): Use rtld_hidden_data_def
 instead of INTVARDEF.
 (_dl_sysdep_start): Do not use INTUSE with __libc_enable_secure.
 * sysdeps/mach/hurd/dl-sysdep.c (__libc_enable_secure): Use
 rtld_hidden_data_def instead of INTVARDEF.
 (_dl_sysdep_start): Do not use INTUSE with __libc_enable_secure.
 * elf/dl-deps.c (expand_dst): Likewise.
 * elf/dl-load.c (_dl_dst_count): Likewise.
 (_dl_dst_substitute): Likewise.
 (decompose_rpath): Likewise.
 (_dl_init_paths): Likewise.
 (open_path): Likewise.
 (_dl_map_object): Likewise.
 * elf/rtld.c (dl_main): Likewise.
 (process_dl_audit): Likewise.
 (process_envvars): Likewise.
 * include/unistd.h [IS_IN_rtld] (__libc_enable_secure_internal):
 Remove declaration.
 (__libc_enable_secure): Use rtld_hidden_proto.

b8c80a7... by Konstantin Serebryany

remove nested functions from elf/dl-load.c

5c0508a... by Joseph Myers <email address hidden>

soft-fp: Use parentheses around macro arguments.

This patch cleans up the soft-fp code to use parentheses around macro
arguments (where possible; many macro arguments are identifiers used
with ## rather than arbitrary expressions, so cannot be put in
parentheses). (I'm not aware of any bugs caused by the lack of
parentheses, but this is generally good practice. The patch is not
exhaustive regarding internal macros where the arguments always come
directly from the mantissa of a floating-point number, although
probably those should be cleaned up in this regard as well.)

Tested for powerpc-nofpu that the installed shared libraries are
unchanged by this patch.

 * soft-fp/double.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_D): Use
 parentheses around macro arguments.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_DP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_D): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_DP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_D): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_DP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_D): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_DP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_D): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_DP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_D): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_DP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_D): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_CMP_D): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_D): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_D): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_D): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_DP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_DP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_DP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_DP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_DP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_DP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_CMP_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_D): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_D): Likewise.
 * soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_E):
 Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_EP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_E): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_EP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_E): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_EP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_E): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_EP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_E): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_CMP_E): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_E): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_E): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_E): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_E): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_E): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_EP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_E): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_EP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_E): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_EP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_E): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_EP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_E): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_CMP_E): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_E): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_E): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_E): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_E): Likewise.
 * soft-fp/op-1.h (_FP_FRAC_SRST_1): Likewise.
 (_FP_FRAC_SRS_1): Likewise.
 (_FP_FRAC_CLZ_1): Likewise.
 (_FP_MUL_MEAT_1_imm): Likewise.
 (_FP_MUL_MEAT_1_wide): Likewise.
 (_FP_MUL_MEAT_1_hard): Likewise.
 (_FP_SQRT_MEAT_1): Likewise.
 (_FP_FRAC_ASSEMBLE_1): Likewise.
 (_FP_FRAC_DISASSEMBLE_1): Likewise.
 * soft-fp/op-2.h (_FP_FRAC_CLZ_2): Likewise.
 (__FP_CLZ_2): Likewise.
 (_FP_MUL_MEAT_2_wide): Likewise.
 (_FP_MUL_MEAT_2_wide_3mul): Likewise.
 (_FP_MUL_MEAT_2_gmp): Likewise.
 (_FP_MUL_MEAT_2_120_240_double): Likewise.
 (_FP_SQRT_MEAT_2): Likewise.
 (_FP_FRAC_ASSEMBLE_2): Likewise.
 (_FP_FRAC_DISASSEMBLE_2): Likewise.
 * soft-fp/op-4.h (_FP_FRAC_SRS_4): Likewise.
 (_FP_FRAC_CLZ_4): Likewise.
 (_FP_MUL_MEAT_4_wide): Likewise.
 (_FP_MUL_MEAT_4_gmp): Likewise.
 (_FP_SQRT_MEAT_4): Likewise.
 (_FP_FRAC_ASSEMBLE_4): Likewise.
 (_FP_FRAC_DISASSEMBLE_4): Likewise.
 * soft-fp/op-common.h (_FP_CMP): Likewise.
 (_FP_CMP_EQ): Likewise.
 (_FP_CMP_UNORD): Likewise.
 (_FP_TO_INT): Likewise.
 (_FP_FROM_INT): Likewise.
 [!__FP_CLZ] (__FP_CLZ): Likewise.
 (_FP_DIV_HELP_imm): Likewise.
 * soft-fp/quad.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_Q):
 Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_QP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_Q): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_RAW_QP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_Q): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_QP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_Q): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_SEMIRAW_QP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_Q): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_QP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_Q): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_PACK_SEMIRAW_QP): Likewise.
 [_FP_W_TYPE_SIZE < 64] (_FP_SQRT_MEAT_Q): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_CMP_Q): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_CMP_EQ_Q): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_CMP_UNORD_Q): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_TO_INT_Q): Likewise.
 [_FP_W_TYPE_SIZE < 64] (FP_FROM_INT_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_QP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_RAW_QP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_QP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_QP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_QP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_PACK_SEMIRAW_QP): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (_FP_SQRT_MEAT_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_CMP_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_CMP_EQ_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_CMP_UNORD_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_TO_INT_Q): Likewise.
 [_FP_W_TYPE_SIZE >= 64] (FP_FROM_INT_Q): Likewise.
 * soft-fp/single.h (FP_UNPACK_RAW_S): Likewise.
 (FP_UNPACK_RAW_SP): Likewise.
 (FP_PACK_RAW_S): Likewise.
 (FP_PACK_RAW_SP): Likewise.
 (FP_UNPACK_S): Likewise.
 (FP_UNPACK_SP): Likewise.
 (FP_UNPACK_SEMIRAW_S): Likewise.
 (FP_UNPACK_SEMIRAW_SP): Likewise.
 (FP_PACK_S): Likewise.
 (FP_PACK_SP): Likewise.
 (FP_PACK_SEMIRAW_S): Likewise.
 (FP_PACK_SEMIRAW_SP): Likewise.
 (_FP_SQRT_MEAT_S): Likewise.
 (FP_CMP_S): Likewise.
 (FP_CMP_EQ_S): Likewise.
 (FP_CMP_UNORD_S): Likewise.
 (FP_TO_INT_S): Likewise.
 (FP_FROM_INT_S): Likewise.

a736ec3... by Joseph Myers <email address hidden>

soft-fp: Support rsigned == 2 in _FP_TO_INT.

Continuing the addition of soft-fp features in the Linux kernel
version, this patch adds _FP_TO_INT support for rsigned == 2 (reduce
overflowing results modulo 2^rsize to fit in the destination, used for
alpha emulation).

The kernel version is buggy; it can left shift by a negative amount
when right shifting is required in an overflow case (the kernel
version also has other bugs fixed long ago in glibc; at least,
spurious exceptions converting to the most negative integer). This
version avoids that by handling overflow (other than to 0) for rsigned
== 2 along with the normal non-overflow case, which already properly
determines the direction in which to shift.

Tested for powerpc-nofpu. Some functions get slightly bigger and some
get slightly smaller, no doubt as a result of the change to where in
the macro "inexact" is raised, but I don't think those changes are
significant. Also tested for powerpc-nofpu with the relevant __fix*
functions changed to use rsigned == 2 (which is after all just as
valid as rsigned == 1 in IEEE terms), including verifying the results
and exceptions for various cases of conversions.

With these seven patches, the one remaining feature to add for the
soft-fp code to have all the features of the kernel version is
_FP_TO_INT_ROUND.

 * soft-fp/op-common.h (_FP_TO_INT): Handle rsigned == 2.

ff12c11... by Joseph Myers <email address hidden>

soft-fp: Support more precise "invalid" exceptions.

As previously discussed
<https://sourceware.org/ml/libc-alpha/2013-10/msg00345.html>, it would
be desirable to be able to use the same version of the soft-fp code in
the Linux kernel as well as in glibc and libgcc (instead of an old
version in the kernel that's missing ten years of bug fixes,
performance improvements and new features), and to that end it is
useful to add to glibc's copy features in the kernel's copy, even when
they are not directly useful in glibc.

To that end, this patch adds one of those features: support for more
precise "invalid" exceptions describing the particular kind of invalid
operation. These are relevant for powerpc emulation, and are also as
described in IEEE 754-2008 as sub-exceptions.

The set of sub-exceptions here is the union of those supported on
powerpc and those from IEEE 754-2008 (the former adds a distinction
between 0/0 and Inf/Inf; the latter adds a distinction between Inf*0
from multiplication and the same from fma). This includes
sub-exceptions for sqrt, conversions to integer and comparisons that
are not supported in the kernel; I see no obvious reason for these
being missing from the kernel support, given that they are supported
on powerpc so accurate powerpc emulation should generate them.

Tested for powerpc-nofpu that the disassembly of installed shared
libraries is unchanged by this patch.

 * soft-fp/soft-fp.h (FP_EX_INVALID_SNAN): New macro.
 (FP_EX_INVALID_IMZ): Likewise.
 (FP_EX_INVALID_IMZ_FMA): Likewise.
 (FP_EX_INVALID_ISI): Likewise.
 (FP_EX_INVALID_ZDZ): Likewise.
 (FP_EX_INVALID_IDI): Likewise.
 (FP_EX_INVALID_SQRT): Likewise.
 (FP_EX_INVALID_CVI): Likewise.
 (FP_EX_INVALID_VC): Likewise.
 * soft-fp/op-common.h (_FP_UNPACK_CANONICAL): Specify more precise
 "invalid" exceptions.
 (_FP_CHECK_SIGNAN_SEMIRAW): Likewise.
 (_FP_ADD_INTERNAL): Likewise.
 (_FP_MUL): Likewise.
 (_FP_FMA): Likewise.
 (_FP_DIV): Likewise.
 (_FP_CMP_CHECK_NAN): Likewise.
 (_FP_SQRT): Likewise.
 (_FP_TO_INT): Likewise.
 (FP_EXTEND): Likewise.

b6dcfe8... by Allan McRae

Update French translation

cb83124... by Joseph Myers <email address hidden>

Don't use INTDEF/INTUSE with __cxa_atexit (bug 14132).

This patch removes use of the obsolete INTDEF/INTUSE mechanism for
__cxa_atexit, replacing it with libc_hidden_def/libc_hidden_proto.

Tested for x86_64 that installed stripped shared libraries are
unchanged by the patch.

 [BZ #14132]
 * stdlib/cxa_atexit.c (__cxa_atexit): Use libc_hidden_def instead
 of INTDEF.
 * include/stdlib.h (__cxa_atexit_internal): Remove declaration.
 (__cxa_atexit): Use libc_hidden_proto.
 [!NOT_IN_libc] (__cxa_atexit): Remove macro definition.

5deeb19... by Joseph Myers <email address hidden>

Remove stray *_internal aliases (bug 14132).

This patch removes some stray (unused) *_internal aliases, and
function prototypes with no corresponding definitions at all, at least
some of which were missed in previous INTDEF / INTUSE removal.

Not removed in this patch: __canonicalize_directory_name_internal,
noticed in the course of preparing this patch, isn't an alias, but an
actual function in sysdeps/mach/hurd/getcwd.c - apparently unused,
however.

Tested for x86_64 that installed stripped shared libraries are
unchanged by this patch.

 [BZ #14132]
 * include/wctype.h [!_ISOMAC] (__iswalpha_l_internal): Remove
 declaration.
 [!_ISOMAC] (__iswdigit_l_internal): Likewise.
 [!_ISOMAC] (__iswspace_l_internal): Likewise.
 [!_ISOMAC] (__iswxdigit_l_internal): Likewise.
 [!_ISOMAC] (__iswctype_internal): Likewise.
 * stdio-common/siglist.c (_sys_siglist_internal): Remove alias.
 * sysdeps/unix/syscalls.list (chown): Remove __chown_internal
 alias.
 (fcntl): Remove __fcntl_internal alias.
 * sysdeps/unix/sysv/linux/hppa/syscalls.list (connect): Remove
 __connect_internal alias.
 * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (connect):
 Likewise.