[cfe-dev] Ownership attribute for malloc checking, revised patch

Andrew McGregor andrewmcgr at gmail.com
Tue Jul 20 20:55:12 PDT 2010


Regenerated patch against an SVN pull today.

This seems complete.

No new tests fail with this patch, and it passes all its own tests.

I have compiled large portions of an embedded Linux distribution with
checking, and given annotations on commonly used container functions, this
reduces the false positive rate for malloc and null pointer dereference
checks enormously.  Without ownership attributes, approx 10k warnings, with
attributes in only a few headers approx 2k warnings (mostly glib headers
plus a few in the proprietary parts of the code), and a sampling of those
shows that they are mostly real problems (if not likely to occur in actual
execution, or of much significance).  We have a checked build in our nightly
runs, and it has already found the root cause of a number of real issues.

The patch itself is a git diff since I am working with git-svn, I have
options for regenerating it if that's not suitable.

Please review.

Thanks,

Andrew McGregor
Allied Telesis Labs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100721/6243b84e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-ownership-withtests-r3.patch
Type: text/x-patch
Size: 32785 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100721/6243b84e/attachment.bin>


More information about the cfe-dev mailing list