[cfe-commits] PATCH: Enhance array bounds checking

Ted Kremenek kremenek at apple.com
Mon Jul 18 17:36:03 PDT 2011


Hi Kaelyn,

Thanks for the statistics.  What would be good to know is what fraction of these are false positives (i.e., are these all real bugs)?  A small random sample might be helpful.  A 24% increase in warnings is fairly substantial, and we don't want to do that unless there is a real benefit.

Ted

On Jul 18, 2011, at 5:18 PM, Kaelyn Uhrain wrote:

> Ted,
> 
> On Thu, Jul 14, 2011 at 5:04 PM, Ted Kremenek <kremenek at apple.com> wrote:
> 
> The only other issue: should this be controlled under a separate warning flag, at least initially so we can experiment with this new warning and see how noisy it is?  E.g. "-Warray-bounds-pointer-arithmetic".
> 
> I've tested the -Warray-bounds changes against the Google codebase and my patch increases the number of warnings from -Warray-bounds by 24%. Of the new warnings, 57.33% are for array indexes that most likely weren't picked up before because of unary operators like & or * (11.1% of all the warnings now emitted), and the remaining 42.67% are from out-of-bounds pointer arithmetic (8.3% of all the warnings from -Warray-bounds).
> 
> Cheers,
> Kaelyn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110718/94b68406/attachment.html>


More information about the cfe-commits mailing list