Answering to myself ....
On 07/05/16 15:24, Pedro Giffuni wrote:
Hmm ...
On 07/05/16 15:14, Conrad Meyer wrote:
Whoops, missed reply-all the first time.
It seems pretty clear that alloc_size (return value is a memory
allocation of size from parameter N) does not apply to posix_memalign,
because posix_memalign's allocation is stored via a pointer argument
rather than return value.
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes
IMO the attribute should be removed from posix_memalign in stdlib.h
Best,
Conrad
- I am wondering why it hasn't affected -current if it is wrong.
Because newer clang removed alloc_size altogether.
- I am also wondering if we shouldn't just get rid of the attribute.
Nah, it is basically meant for FORTIFY_SOURCE, which is not being
worked on anymore but maybe handy some day.
I will answer to myself those doubts and fix the issue. Thanks!
So, yes, we should remove it from posix_memalign(). I'll ask re@.
Pedro.
_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"