Subject: bug#24065: commit 09ece4d341a7 (Restore the calloc family) causes miscompile for gcc-5 and higher

From: Wolfgang Jenkner <[email-masked]>
Date: Mon, 25 Jul 2016 17:48:50 +0200

Markus Trippelsdorf <[email-masked]> wrote:

> > > This happens on a Gentoo system (glibc trunk, gcc-6 latest branch):

> But version 24.5 is the latest stable release. 
> It is sad, that it cannot be compiled with gcc-5 or gcc-6.

Actually, on GNU/Linux src/gmalloc.c (which contains the code in
question) is not even compiled, normally.

The reason for your compilation troubles seems to be that you use
a recent git checkout of glibc (as you stated above) which I guess
already contains

http://repo.or.cz/glibc.git/commitdiff/2ba3cfa1607c36613f3b30fb1ae4ec530245ce64

IIUC, this commit removes  the declaration of __malloc_initialize_hook,
so the emacs configure check for "whether malloc is Doug Lea style"
will fail.

And this is the reason why you suddenly need malloc etc. from
src/gmalloc.c.