This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

--- Comment #6 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, hjl/pr21120/master has been created
        at  1c13144a6252b1edc40c4900c6ea683aea6fc691 (commit)

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

commit 1c13144a6252b1edc40c4900c6ea683aea6fc691
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jun 29 10:26:04 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>.

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

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]