This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PING: PATCH: [BZ #14562] Properly handle fencepost withMALLOC_ALIGN_MASK
On Mon, 24 Sep 2012 06:24:43 -0700, H.J. wrote:
> There is no misalignment for fencepost. fencepost has been aligned to
> MALLOC_ALIGNMENT. The issue is
>
> chunk_at_offset(prev_heap, prev_heap->size - (MINSIZE-2*SIZE_SZ));
>
> may not point to fencepost if it isn't aligned to MALLOC_ALIGNMENT.
> My patch makes sure that heap_trim gets fencepost aligned to
> MALLOC_ALIGNMENT.
>
Ah sorry, I overlooked the fact that this is for x32. MINSIZE-2*SIZE_SZ
won't be aligned to MALLOC_ALIGNMENT for x32 since SIZE_SZ == 4. The
change looks OK to me.
Thanks,
Siddhesh