[PATCH] Division by zero

Anders Rönnholm Anders.Ronnholm at evidente.se
Mon Sep 8 07:06:54 PDT 2014


>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 don't mean the regular dereference but the new "dereference then check" checker. We have it completed but haven't sent the patch due to this change that you propose. We simply suggest that we submit this check now as it's completed and working rather well and we currently don't have time to redo it.

>I agree that it would not be a very easy task, but this is the right way to approach the problem.
>
>I don't know when we can deliver this as CFG-based (definitely not this year),  wouldn't it be better to have it like this now?
>
>For a possible remake of this checker to a CFG-based one in the future, we would need more help from you on how to make them CFG-based. What parts of LiveVariables and DeadStoresChecker are related to our check? I guess just parts of the LiveVariables framework is needed.
>
>DeadStoresChecker is an example of other flow sensitive checks. You would need to create a similar one for div by zero / dereference.
>
>
Yes i know that DeadStoresChecker is an example of a flow sensitive check. It seems like it uses LiveVariables and only reacts to what happens there. Do we need to create our own LiveVariables framework for our checkers and then observe it like DeadStoresChecker observes LiveVariables?

Thanks,
Anders



More information about the cfe-commits mailing list