This is the mail archive of the libc-alpha@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]

Re: [PATCH] malloc: Fix for infinite loop in memalign/posix_memalign.


On 11 October 2013 14:33, OndÅej BÃlka <neleai@seznam.cz> wrote:
> On Thu, Oct 10, 2013 at 01:26:21PM +0100, Will Newton wrote:
>> +
>> +  /* Test to expose integer overflow in malloc internals from BZ #16038.  */
>> +  p = memalign (-1, pagesize);
>> +
>> +  save = errno;
>> +
>> +  if (p != NULL)
>> +    merror ("memalign (-1, pagesize) succeeded.");
>> +
>> +  if (p == NULL && save != EINVAL)
>> +    merror ("memalign (-1, -pagesize) errno is not set correctly");
>> +
> Why are you switching between pagesize and -pagesize?

Thanks for spotting the typo, fixed.

-- 
Will Newton
Toolchain Working Group, Linaro


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