[cfe-dev] RFC: static analysis, malloc annontation for return via pointer argument

Scott Parlane scott at scottnz.com
Mon Dec 17 13:55:17 PST 2012


Hi All,

This patch allows for APIs were memory is allocated and placed in a
pointer given to them. (like asprintf, but without the realloc feature)

Currently, when using a pointer to a stack variable as the input to the
function, it declares the memory leak on the next source line after the
stack variable is used. I think it should be declaring the leak on the
last line of the current scope. Which is correct ?

Regards,
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-clang-static-analysis-support-allocation-into-a.patch
Type: text/x-patch
Size: 11097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121218/7917721d/attachment.bin>


More information about the cfe-dev mailing list