[cfe-commits] [PATCH 1/1] Checking zero byte allocation for realloc() and calloc().

Ted Kremenek kremenek at apple.com
Mon Dec 5 22:36:25 PST 2011


On Nov 19, 2011, at 9:07 PM, Cyril Roelandt wrote:

> Done ! May I ask why we use a for loop in the malloc test ? I've done the same for calloc and realloc, but did not really get it.

The original PR was 2899:

http://llvm.org/bugs/show_bug.cgi?id=2899

The loops just show a typically usage of allocating memory and scribbling to the bytes.  It just represents what such code might look like in practice.  It isn't needed for testing this checker.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111205/99f89786/attachment.html>


More information about the cfe-commits mailing list