This is the mail archive of the
mailing list for the glibc project.
Re: Removal of unexec support from glibc malloc
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Eli Zaretskii <eliz at gnu dot org>, Emacs-devel at gnu dot org, GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 18 Jan 2016 22:31:07 -0800
- Subject: Re: Removal of unexec support from glibc malloc
- Authentication-results: sourceware.org; auth=none
- References: <569CDB81 dot 6040600 at redhat dot com> <569D3BE0 dot 6050103 at cs dot ucla dot edu> <m2a8o2vg5x dot fsf at newartisans dot com> <569D4207 dot 4060209 at cs dot ucla dot edu> <83mvs2d5b2 dot fsf at gnu dot org> <858u3meiv1 dot fsf at iznogoud dot viz> <569D6A3E dot 2010009 at cs dot ucla dot edu> <569D73D7 dot 1080206 at redhat dot com>
Florian Weimer wrote:
See my other message. I'm attaching the configure.ac patch I used.
Ah, in that case (as Joseph pointed out) in 2014 I mentioned a simple way to
test this approach, which requires no patch to Emacs or to glibc. Configure
Emacs this way:
This causes Emacs to use its own malloc implementation. Back then I observed
that this hurt performance somewhat (text 0.5% larger, data 7.6% larger, 14%
more CPU time on my usual benchmark) but I did not observe any bugs; see
I'll test this more, and if it doesn't have problems then we can declare the
issue resolved, from glibc's point of view anyway. On the Emacs side we still
have unexec cleanup to do, but the glibc change does not make this much more
urgent than it already is, and we needn't make any changes to Emacs before Emacs
25 comes out.
With a bit of luck, newer valgrind versions will even recognize the
interposed malloc, simplifying leak detection.
Wow, thanks, I didn't know that. I have been using valgrind only on temacs (the
undumped, slow, and hard-to-use Emacs), because valgrind doesn't work on dumped
emacs under GNU/Linux. With the above configuration hack, valgrind works on
dumped emacs; this is a win when debugging, and to me it's worth the performance