__malloc_initialize_hook removal in glibc 2.24
Markus Trippelsdorf
markus@trippelsdorf.de
Mon Aug 1 14:22:00 GMT 2016
On 2016.07.22 at 23:15 +0200, Florian Weimer wrote:
> I would like to obtain an explicit decision about the removal of
> __malloc_initialize_hook in glibc 2.24.
>
> The situation is roughly this: __malloc_initialize_hook was deprecated in
> 2011. Emacs keeps using it to this day, ignoring the deprecation (and
> despite multiple warnings on emacs-devel that the interface is going away).
> As a result, the fallback code in Emacs in src/gmalloc.c has not seen much
> test coverage on GNU/Linux systems. Testing in OpenSUSE and Fedora
> uncovered an issue on ppc64/ppc64le. Other platforms may have problems as
> well.
>
> We have a chicken-and-egg issue here. Until Emacs starts using
> src/gmalloc.c on GNU/Linux (or gets rid of the non-portable dumper, but this
> is going to be a far more radical change), src/gmalloc.c will not see much
> test coverage (particularly on GNU/Linux). Less coverage means that bugs
> remain, and glibc cannot remove __malloc_initialize_hook (or take other
> measures to disable heap dumping support) because that would break Emacs for
> too many users (well, those users who compile their own Emacs binaries and
> are on bleeding-edge glibc versions, which can't be that many).
I ran into this issue last week. Actually temacs crashes during the
build even on X86_64. It took me some time to figure out what was going
on.
src/gmalloc.c is build without -fno-builtin-malloc so the calloc()
function there gets "miscompiled" with gcc-5 and higher.
So please revert before the next release.
--
Markus
More information about the Libc-alpha
mailing list