Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4E12E6A4.4000000@gmail.com>
Date: Tue, 05 Jul 2011 12:25:40 +0200
From: Luka Marčetić <paxcoder@...il.com>
To: musl@...ts.openwall.com
Subject: Re: cluts - posix_memalign test

On 07/05/2011 02:44 AM, Rich Felker wrote:
> W:posix_memalign returned EINVAL, but gave a non-NULL pointer (alignment=1)
> I suppose some versions of posix_memalign might clear the pointer to
> null if allocation fails, but I could find no text in the standard
> that requires or even allows posix_memalign to modify the pointer when
> it fails, so at present musl does not touch it.
>
> I'd welcome input from anyone who has a good argument that this is
> incorrect, but short of that, I think cluts is checking a condition
> that need not (and maybe can't) be true.
>
> Rich

Technically, it was a warning (prints to stdout and doesn't set an 
error), but you're right. It's what malloc and calloc should do, not 
posix_memalign, so it shouldn't be there in the first place. Removed it. 
Thanks.

Speaking of malloc.c, I changed my mind about rewriting it this week, in 
favor of writing more new code (framework and tasks). The test seems to 
work even though it's awful(ly slow), so it'll have to do for now.
-Luka

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.