glibc:gentoo/2.20

Last commit made on 2015-07-21
Get this branch:
git clone -b gentoo/2.20 https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
gentoo/2.20
Repository:
lp:glibc

Recent commits

716f049... by Mike Frysinger

sparc: fix sigaction for 32bit builds [BZ #18694]

Commit a059d359d86130b5fa74e04a978c8523a0293f77 changed the sigaction
struct to pass conform tests, but it ended up also changing the ABI for
32 bit builds. For 64 bit builds, changing the long to two ints works,
but for 32 bit builds, it inserts 4 extra bytes. This leads to many
packages randomly failing like bash that spews things like:
 configure: line 471: wait_for: No record of process 0

Bracket the new member by a wordsize check to fix the ABI for 32bit.

(cherry picked from commit 7fde904c73c57faea48c9679bbdc0932d81b3a2f)
(cherry picked from commit ed99e5f9cc6471745488f269d16ee5b127944a85)

2511fe2... by Mike Frysinger

Merge branch 'release/2.20/master' into 'gentoo/2.20'

4d54424... by Ppluzhnikov-google

CVE-2015-1472: wscanf allocates too little memory

BZ #16618

Under certain conditions wscanf can allocate too little memory for the
to-be-scanned arguments and overflow the allocated buffer. The
implementation now correctly computes the required buffer size when
using malloc.

A regression test was added to tst-sscanf.

(cherry picked from commit 5bd80bfe9ca0d955bfbbc002781bc7b01b6bcb06)

Conflicts:
 ChangeLog
 NEWS

1bf9d48... by "H.J. Lu" <email address hidden>

Use AVX unaligned memcpy only if AVX2 is available

memcpy with unaligned 256-bit AVX register loads/stores are slow on older
processorsl like Sandy Bridge. This patch adds bit_AVX_Fast_Unaligned_Load
and sets it only when AVX2 is available.

 [BZ #17801]
 * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
 Set the bit_AVX_Fast_Unaligned_Load bit for AVX2.
 * sysdeps/x86_64/multiarch/init-arch.h (bit_AVX_Fast_Unaligned_Load):
 New.
 (index_AVX_Fast_Unaligned_Load): Likewise.
 (HAS_AVX_FAST_UNALIGNED_LOAD): Likewise.
 * sysdeps/x86_64/multiarch/memcpy.S (__new_memcpy): Check the
 bit_AVX_Fast_Unaligned_Load bit instead of the bit_AVX_Usable bit.
 * sysdeps/x86_64/multiarch/memcpy_chk.S (__memcpy_chk): Likewise.
 * sysdeps/x86_64/multiarch/mempcpy.S (__mempcpy): Likewise.
 * sysdeps/x86_64/multiarch/mempcpy_chk.S (__mempcpy_chk): Likewise.
 * sysdeps/x86_64/multiarch/memmove.c (__libc_memmove): Replace
 HAS_AVX with HAS_AVX_FAST_UNALIGNED_LOAD.
 * sysdeps/x86_64/multiarch/memmove_chk.c (__memmove_chk): Likewise.

(cherry picked from commit 5f3d0b78e011d2a72f9e88b0e9ef5bc081d18f97)

Conflicts:
 ChangeLog
 NEWS

f9e0f43... by Leonhard Holz <email address hidden>

Fix memory handling in strxfrm_l [BZ #16009]

[Modified from the original email by Siddhesh Poyarekar]

This patch solves bug #16009 by implementing an additional path in
strxfrm that does not depend on caching the weight and rule indices.

In detail the following changed:

* The old main loop was factored out of strxfrm_l into the function
do_xfrm_cached to be able to alternativly use the non-caching version
do_xfrm.

* strxfrm_l allocates a a fixed size array on the stack. If this is not
sufficiant to store the weight and rule indices, the non-caching path is
taken. As the cache size is not dependent on the input there can be no
problems with integer overflows or stack allocations greater than
__MAX_ALLOCA_CUTOFF. Note that malloc-ing is not possible because the
definition of strxfrm does not allow an oom errorhandling.

* The uncached path determines the weight and rule index for every char
and for every pass again.

* Passing all the locale data array by array resulted in very long
parameter lists, so I introduced a structure that holds them.

* Checking for zero src string has been moved a bit upwards, it is
before the locale data initialization now.

* To verify that the non-caching path works correct I added a test run
to localedata/sort-test.sh & localedata/xfrm-test.c where all strings
are patched up with spaces so that they are too large for the caching path.

(cherry picked from commit 0f9e585480edcdf1e30dc3d79e24b84aeee516fa)

Conflicts:
 ChangeLog
 NEWS

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

Move findidx nested functions to top-level.

Needed in order to backport strxfrm_l security fix cleanly.

(cherry picked from commit 8c0ab919f63dc03a420751172602a52d2bea59a8)

Conflicts:
 ChangeLog

f80af76... by Florian Weimer

Avoid infinite loop in nss_dns getnetbyname [BZ #17630]

(cherry picked from commit 11e3417af6e354f1942c68a271ae51e892b2814d)
(cherry picked from commit e54db0ea6a49affac43fa305fd134f3020c41382)

Conflicts:
 NEWS

a3a1f41... by Jeff Law <email address hidden>

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.

(cherry picked from commit a5357b7ce2a2982c5778435704bcdb55ce3667a0)
(cherry picked from commit ae61fc7b33d9d99d2763c16de8275227dc9748ba)

Conflicts:
 NEWS

d73ac1b... by Siddhesh Poyarekar <email address hidden>

Make __extern_always_inline usable on clang++ again

The fix for BZ #17266 (884ddc5081278f488ef8cd49951f41cfdbb480ce)
removed changes that had gone into cdefs.h to make
__extern_always_inline usable with clang++. This patch adds back
support for clang to detect if GNU inlining semantics are available,
this time without breaking the gcc use case. The check put here is
based on the earlier patch and assertion[1] that checking if
__GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE__ is defined is sufficient
to determine that clang++ suports GNU inlining semantics.

Tested with a simple program that builds with __extern_always_inline
with the patch and fails compilation without it.

 #include <stdio.h>
 #include <sys/cdefs.h>

extern void foo_alias (void) __asm ("foo");

__extern_always_inline void
foo (void)
{
  puts ("hi oh world!");
  return foo_alias ();
}

void
foo_alias (void)
{
  puts ("hell oh world");
}

int
main ()
{
  foo ();
}

[1] https://sourceware.org/ml/libc-alpha/2012-12/msg00306.html

 [BZ #17266]
 * misc/sys/cdefs.h: Define __extern_always_inline for clang
 4.2 and newer.

(cherry picked from commit 602f80ec8b966cfad3b61914cbe14ee606cedf6e)

1b08ac8... by Mike Frysinger

arm: drop EABI check

GCC marked OABI obsolete in 4.7 and dropped it in 4.8. So the number
of people this is catching is shrinking every day. At this point,
it's not terribly useful, so just drop it.

(cherry picked from commit 34d97d87bb1c08e34d08a9d4be24a3b1d53a4ddb)