This is the mail archive of the glibc-bugs@sourceware.org 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]

[Bug libc/12495] Malloc fails if MALLOC_ALIGNMENT > 2 * SIZE_SZ


http://sourceware.org/bugzilla/show_bug.cgi?id=12495

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|dan at codesourcery dot com |roland at gnu dot org

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-20 21:57:30 UTC ---
(In reply to comment #5)
> diff --git a/malloc/malloc.c b/malloc/malloc.c
> index c4bc1fb..f8acd66 100644
> --- a/malloc/malloc.c
> +++ b/malloc/malloc.c
> @@ -3370,8 +3370,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb;
> mstat
> e av;
>            is always true after initialization.
>          */
> 
> -        correction = MALLOC_ALIGNMENT - front_misalign;
> -        aligned_brk += correction;
> +        aligned_brk += MALLOC_ALIGNMENT - front_misalign;
>        }
>      }

This fixes the double correction problem.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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