[PATCH] malloc: Correct size computation in realloc for dumped fake mmapped chunks

Carlos O'Donell carlos@redhat.com
Wed Jun 8 20:39:00 GMT 2016


On 06/08/2016 02:51 PM, Florian Weimer wrote:
> For regular mmapped chunks there are two size fields (hence a reduction
> by 2 * SIZE_SZ bytes), but for fake chunks, we only have one size field,
> so we need to subtract SIZE_SZ bytes.
> 
> This was initially reported as Emacs bug 23726.
> 
> 2016-06-08  Florian Weimer  <fweimer@redhat.com>
> 
> 	Emacs bug 23726.
> 	* malloc/malloc.c (dumped_main_arena_start): Update comment.
> 	(__libc_realloc): Correct size computation for dumped fake mmapped
> 	chunks.

Reviewed the existing mmapped chunk code, and this fix looks good to me.

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list