[PATCH] Division by zero

Jordan Rose jordan_rose at apple.com
Mon Sep 8 09:51:57 PDT 2014


On Sep 5, 2014, at 10:03 , Anna Zaks <ganna at apple.com> wrote:

> 
>> On Sep 5, 2014, at 5:24 AM, Anders Rönnholm <Anders.Ronnholm at evidente.se> wrote:
>> 
>> Hi,
>> 
>> I feel that to change this checker and the null dereference check would take a large amount of time compared to what is gained, time which could be used more efficiently on other checkers.
>> The null dereference check is already completed as path sensitive and works well.
> 
> We are talking about converting only the "check after division/dereference" (not regular div by zero or dereference checks) because these checks require all paths reasoning (See the "[cfe-dev] [RFC] Creating base class for 'Test after X' checkers" thread). The main win is speed (flow sensitive analyzes are algorithmically much simpler than the path sensitive ones), which also opens a possibility of converting this into a compiler warning.
> 
> I agree that it would not be a very easy task, but this is the right way to approach the problem.

I agree with Anna. Doing this because it's convenient is really just technical debt and isn't something we'd necessarily be comfortable moving out of the "alpha" package, meaning that plenty of users won't even know it exists. I can see us very easily never coming back to do the "right" thing here.

Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140908/a4525ca6/attachment.html>


More information about the cfe-commits mailing list