Removal of unexec support from glibc malloc

Florian Weimer fweimer@redhat.com
Tue Jan 19 10:14:00 GMT 2016


On 01/19/2016 10:27 AM, Florian Weimer wrote:
> On 01/19/2016 07:31 AM, Paul Eggert wrote:
> 
>>> 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 new interposing-aware valgrind, valgrind still works, but
> there's a memory allocation failure because valgrind detects an invalid
> realloc and makes it return NULL, instead of forwarding it to the
> implementation.
> 
> We're looking at this to see if it's easy to fix in valgrind.

This will not work until the undumping code iterates over all heap
objects and marks them with VALGRIND_MALLOCLIKE_BLOCK.  It's not exactly
trivial (but not that hard, either).  There might be secondary breakage
after that.

Florian



More information about the Libc-alpha mailing list