Author: adconrad Date: 2012-10-25 13:12:21 +0000 (Thu, 25 Oct 2012) New Revision: 5328
Added: glibc-package/branches/eglibc-2.16/debian/patches/any/cvs-malloc-arena.diff Removed: glibc-package/branches/eglibc-2.16/debian/cvs-malloc-arena.diff Log: Add missing patch from Daniel Schepler's x32 support branch Deleted: glibc-package/branches/eglibc-2.16/debian/cvs-malloc-arena.diff =================================================================== --- glibc-package/branches/eglibc-2.16/debian/cvs-malloc-arena.diff 2012-10-25 13:09:34 UTC (rev 5327) +++ glibc-package/branches/eglibc-2.16/debian/cvs-malloc-arena.diff 2012-10-25 13:12:21 UTC (rev 5328) @@ -1,33 +0,0 @@ -2012-09-08 H.J. Lu <[email protected]> - - [BZ #14562] - * malloc/arena.c (heap_trim): Properly get fencepost and adjust - new chunk size with MALLOC_ALIGN_MASK. - ---- - malloc/arena.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - ---- a/malloc/arena.c -+++ b/malloc/arena.c -@@ -652,15 +652,18 @@ - unsigned long pagesz = GLRO(dl_pagesize); - mchunkptr top_chunk = top(ar_ptr), p, bck, fwd; - heap_info *prev_heap; -- long new_size, top_size, extra; -+ long new_size, top_size, extra, misalign; - - /* Can this heap go away completely? */ - while(top_chunk == chunk_at_offset(heap, sizeof(*heap))) { - prev_heap = heap->prev; - p = chunk_at_offset(prev_heap, prev_heap->size - (MINSIZE-2*SIZE_SZ)); -+ /* fencepost must be properly aligned. */ -+ misalign = ((long) p) & MALLOC_ALIGN_MASK; -+ p = (mchunkptr)(((unsigned long) p) & ~MALLOC_ALIGN_MASK); - assert(p->size == (0|PREV_INUSE)); /* must be fencepost */ - p = prev_chunk(p); -- new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ); -+ new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ) + misalign; - assert(new_size>0 && new_size<(long)(2*MINSIZE)); - if(!prev_inuse(p)) - new_size += p->prev_size; Copied: glibc-package/branches/eglibc-2.16/debian/patches/any/cvs-malloc-arena.diff (from rev 5327, glibc-package/branches/eglibc-2.16/debian/cvs-malloc-arena.diff) =================================================================== --- glibc-package/branches/eglibc-2.16/debian/patches/any/cvs-malloc-arena.diff (rev 0) +++ glibc-package/branches/eglibc-2.16/debian/patches/any/cvs-malloc-arena.diff 2012-10-25 13:12:21 UTC (rev 5328) @@ -0,0 +1,33 @@ +2012-09-08 H.J. Lu <[email protected]> + + [BZ #14562] + * malloc/arena.c (heap_trim): Properly get fencepost and adjust + new chunk size with MALLOC_ALIGN_MASK. + +--- + malloc/arena.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/malloc/arena.c ++++ b/malloc/arena.c +@@ -652,15 +652,18 @@ + unsigned long pagesz = GLRO(dl_pagesize); + mchunkptr top_chunk = top(ar_ptr), p, bck, fwd; + heap_info *prev_heap; +- long new_size, top_size, extra; ++ long new_size, top_size, extra, misalign; + + /* Can this heap go away completely? */ + while(top_chunk == chunk_at_offset(heap, sizeof(*heap))) { + prev_heap = heap->prev; + p = chunk_at_offset(prev_heap, prev_heap->size - (MINSIZE-2*SIZE_SZ)); ++ /* fencepost must be properly aligned. */ ++ misalign = ((long) p) & MALLOC_ALIGN_MASK; ++ p = (mchunkptr)(((unsigned long) p) & ~MALLOC_ALIGN_MASK); + assert(p->size == (0|PREV_INUSE)); /* must be fencepost */ + p = prev_chunk(p); +- new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ); ++ new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ) + misalign; + assert(new_size>0 && new_size<(long)(2*MINSIZE)); + if(!prev_inuse(p)) + new_size += p->prev_size; -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

