PATCH: Malloc fails if MALLOC_ALIGNMENT > 2 * SIZE_SZ

Daniel Jacobowitz drow@false.org
Sat Aug 20 16:30:00 GMT 2011


On Fri, Aug 19, 2011 at 7:08 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> In that case, we don't change default MALLOC_ALIGNMENT
>
> I'd like to hear from Daniel before we decide what we think we're doing.

Well, as usual, H.J. hasn't said why he wants the change - so I'm not
sure what he thinks he's doing with the revised patch.  Is it for an
out-of-tree ABI?  Maybe x32?

As is, it will break Emacs on PPC -mlong-double-128.  My preference
would be to emit some sensible error message before aborting, or to
have malloc_set_state return an error; that latter is the most
independently correct choice, but Emacs does not check for an error
return, so it's not of as much practical value.  IMO it is too much to
ask to preserve compatibility on this ABI, at significant complexity
cost, solely for the benefit of emacs.  I would be outright amazed if
anyone else called malloc_set_state.

-- 
Thanks,
Daniel



More information about the Libc-alpha mailing list