On Thu, 26 Jul 2012 10:42:41 -0700, Geoffrey Irving said:

>This is still a bug in Mac's posix_memalloc, though, since presumably
>any craziness they decide to return should still be a valid argument
>to free.  I filed a bug with Apple and worked around it in my code
>with a !size check.

What's your bug number?

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.

Also, here's a reference about 0-sized allocs:
<https://www.securecoding.cert.org/confluence/display/seccode/MEM04-C.+Do+not+perform+zero+length+allocations>

-- 
____________________________________________________________
Sean McBride, B. Eng                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada



------------------------------------------------------------------------------
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

Reply via email to