[Bug malloc/21120] glibc malloc is incompatible with GCC 7

cvs-commit at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Fri Jun 30 16:16:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=21120

--- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  4e61a6be446026c327aa70cef221c9082bf0085d (commit)
      from  a9270e673dcc1ef1d2c2d96fa09d468c59883d88 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4e61a6be446026c327aa70cef221c9082bf0085d

commit 4e61a6be446026c327aa70cef221c9082bf0085d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jun 30 09:11:08 2017 -0700

    i386: Increase MALLOC_ALIGNMENT to 16 [BZ #21120]

    GCC 7 changed the definition of max_align_t on i386:

   
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9b5c49ef97e63cc63f1ffa13baf771368105ebe2

    As a result, glibc malloc no longer returns memory blocks which are as
    aligned as max_align_t requires.

    This causes malloc/tst-malloc-thread-fail to fail with an error like this
    one:

    error: allocation function 0, size 144 not aligned to 16

    This patch moves the MALLOC_ALIGNMENT definition to <malloc-alignment.h>
    and increases the malloc alignment to 16 for i386.

        [BZ #21120]
        * malloc/malloc-internal.h (MALLOC_ALIGNMENT): Moved to ...
        * sysdeps/generic/malloc-alignment.h: Here.  New file.
        * sysdeps/i386/malloc-alignment.h: Likewise.
        * sysdeps/generic/malloc-machine.h: Include <malloc-alignment.h>.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |    8 ++++++++
 malloc/malloc-internal.h                           |   10 ----------
 .../generic/malloc-alignment.h                     |   19 +++++++++++--------
 sysdeps/generic/malloc-machine.h                   |    1 +
 .../locale_t.h => sysdeps/i386/malloc-alignment.h  |   12 +++++-------
 5 files changed, 25 insertions(+), 25 deletions(-)
 copy bits/uio-ext.h => sysdeps/generic/malloc-alignment.h (55%)
 copy locale/bits/types/locale_t.h => sysdeps/i386/malloc-alignment.h (80%)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list