This is the mail archive of the 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]

Re: The direction of malloc?

On 12/16/2013 10:46 PM, Roland McGrath wrote:
The main purpose of malloc_get_state / malloc_set_state is for use by
emacs.  If emacs adopted a better approach I'd happily deprecate them -
turn them into compat symbols - but you still need to support them
indefinitely with existing emacs binaries, as a matter of binary
compatibility.  (Support could mean such binaries - binaries using the
malloc_set_state compat symbol - use a different copy of malloc in libc
from what all other binaries use, if necessary.)

(I believe I've mentioned this before when discussing the ppc32 ABI
situation.)  I'm pretty sure that the way Emacs uses malloc before dumping
is such that there's no significant amount of allocation done then (if any)
that will ever be freed later.  So for ABI compatibility it is probably
sufficient to have a malloc_set_state call from an old binary result in the
allocations made up to that point becoming unfreeable.

Could we fix this in Emacs somehow? Or do we have to support old Emacs binaries forever?

Florian Weimer / Red Hat Product Security Team

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