[PATCH] Fix crash in CFGReachabilityAnalysis triggered by IdempotentOperationChecker.

Ted Kremenek kremenek at apple.com
Fri Dec 20 16:04:18 PST 2013


IdempotentOperationsChecker has suffered from several known limitations for a while, but the addition of interprocedural analysis has certainly compounded the issues.  I had thought about it at the time when we added interprocedural analysis, but it never became a pressing action item.

This checker has been in the alpha state for a couple years now.  Making it real is going to take a lot of work beyond just fixing these immediate issues.  I think we should just go and remove it entirely.  If we want to resuscitate it one day we can.

On Dec 19, 2013, at 9:02 AM, Jordan Rose <jordan_rose at apple.com> wrote:

> 
>  Aha, of course. Unfortunately, this means that the IdempotentOperations checker is even more broken than we thought, because it tries to make claims about inlined functions.
> 
>  I like the assert, but I don't think perpetuating the brokenness is a good idea. With this fix, any blocks that were in an inlined function will not be considered reachable from a path through the caller, even though they might be. Worse, and independent of this issue, is the fact that within an inlined function we only see one path, and the checker might mistakenly take that to be the only possible path.
> 
>  If we just throw out inlined functions altogether, it might start making sense, but then you don't get very good coverage.
> 
> http://llvm-reviews.chandlerc.com/D2427




More information about the cfe-commits mailing list