glibc:linaro/2.21/master

Last commit made on 2017-04-21
Get this branch:
git clone -b linaro/2.21/master https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
linaro/2.21/master
Repository:
lp:glibc

Recent commits

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

Make io/ftwtest-sh remove temporary files on early exit.

The test io/ftwtest-sh creates a directory that at some points during
the test does not have execute permission. To avoid leaving behind
such a directory that prevents the build directory from being removed
with a simple "rm -rf", it traps various signals to make the directory
executable and remove it before exit. However, this doesn't cover the
case where one of the tests simply fails (which happens with cross
testing if testing on a remote system where the path to the build
directory involves a symlink, or if that remote system fell over
during testing - I think the latter is the case where the directory is
left behind with bad permissions).

This patch makes that test also trap signal 0 (exit) so that the
directory gets properly removed in such failure cases as well.

Tested in both configurations where the test passes and where it fails
to verify that the result of the test is unchanged but the directory
is no longer left behind where it was previously left behind.

 * io/ftwtest-sh: Also trap on exit to remove temporary files.

136c42b... by Adhemerval Zanella

posix: Add cleanup on the trap list for globtest.sh

This patch prevents lingering files for SIGSEGV failures by adding
a cleanup handler on trap handler. Checked on x86_64-linux-gnu.

 * posix/globtest.sh: Add cleanup routine on trap 0.

Cherry-pick of 4fee33f.

43765a1... by Adhemerval Zanella

malloc: Fix i686 build from malloc interpose backport

This patch fixes i686 build after malloc interpose fix backport
(commit 749c94d4).

Checked on i686-linux-gnu.

 * malloc/arena.c (__malloc_fork_lock_parent): Add internal_function
 attribute.
 (__malloc_fork_unlock_parent): Likewise.
 (__malloc_fork_unlock_child): Likewise.

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

Extend local PLT reference check

On x86, linker in binutils 2.26 and newer consolidates R_*_JUMP_SLOT with
R_*_GLOB_DAT relocation against the same symbol. This patch extends
local PLT reference check to support alternate relocations.

 [BZ #18078]
 * scripts/check-localplt.awk: Support alternate relocations.
 * scripts/localplt.awk: Also check relocations in DT_RELA/DT_REL
 sections.
 * sysdeps/unix/sysv/linux/i386/localplt.data: Mark free and
 malloc entries with + REL R_386_GLOB_DAT.
 * sysdeps/x86_64/localplt.data: New file.

cf161d3... by Alan Modra

Fix localplt test breakage with new readelf

Since 2014-11-24 binutils git commit bb4d2ac2, readelf has appended
the symbol version to symbols shown in reloc dumps.

 [BZ #16512]
 * scripts/localplt.awk: Strip off symbol version.
 * NEWS: Mention bug fix.

a274119... by Florian Weimer

malloc: Simplify static malloc interposition [BZ #20432]

Existing interposed mallocs do not define the glibc-internal
fork callbacks (and they should not), so statically interposed
mallocs lead to link failures because the strong reference from
fork pulls in glibc's malloc, resulting in multiple definitions
of malloc-related symbols.

a18c25e... by Florian Weimer

nptl/tst-tls3-malloc: Force freeing of thread stacks

It turns out that due to the reduced stack size in tst-tls3 and the
(fixed) default stack cache size, allocated TLS variables are never
freed, so the test coverage for tst-tls3-malloc is less than complete.
This change increases the thread stack size for tst-tls3-malloc only,
to make sure thread stacks and TLS variables are freed.

124ea50... by Florian Weimer

malloc: Run tests without calling mallopt [BZ #19469]

The compiled tests no longer refer to the mallopt symbol
from their main functions. (Some tests still call mallopt
explicitly, which is fine.)

5a8692a... by Florian Weimer

elf: Do not use memalign for TCB/TLS blocks allocation [BZ #17730]

Instead, call malloc and explicitly align the pointer.

There is no external location to store the original (unaligned)
pointer, and this commit increases the allocation size to store
the pointer at a fixed location relative to the TCB pointer.

The manual alignment means that some space goes unused which
was previously made available for subsequent allocations.
However, in the TLS_DTV_AT_TP case, the manual alignment code
avoids aligning the pre-TCB to the TLS block alignment. (Even
while using memalign, the allocation had some unused padding
in front.)

This concludes the removal of memalign calls from the TLS code,
and the new tst-tls3-malloc test verifies that only core malloc
routines are used.

6a277a4... by Florian Weimer

elf: Avoid using memalign for TLS allocations [BZ #17730]

Instead of a flag which indicates the pointer can be freed, dtv_t
now includes the pointer which should be freed. Due to padding,
the size of dtv_t does not increase.

To avoid using memalign, the new allocate_dtv_entry function
allocates a sufficiently large buffer so that a sub-buffer
can be found in it which starts with an aligned pointer. Both
the aligned and original pointers are kept, the latter for calling
free later.