On Thu, Jul 26, 2012 at 11:12 AM, Sean McBride <s...@rogue-research.com> wrote: > > I think it's definitely worth a bug report. If nothing else, the man page > should discuss whether a zero size is undefined behaviour or not.
The POSIX spec makes it pretty clear that this is not undefined behavior: http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_memalign.html "If the size of the space requested is 0, the behavior is implementation-defined; the value returned in memptr shall be either a null pointer or a unique pointer." and "The free() function shall deallocate memory that has previously been allocated by posix_memalign()." Geoffrey is right; this is unambiguously a bug in Apple's C library. Nice catch. - Pat ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users