[PATCH] D12358: [Analyzer] Handling constant bound loops
Anna Zaks via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 26 18:29:38 PDT 2015
zaks.anna requested changes to this revision.
zaks.anna added a comment.
This revision now requires changes to proceed.
I agree that the way the static analyzer handles loops with known bounds is quite bad and we loose coverage because of it, so this is definitely an important problem to solve!
I've briefly looked at the patch and the main problem is that while you reset the value of the counter variable, you do not change the values of the other variables. This will leave us in a state that is wrong and will likely lead to false positives and inconsistencies, avoiding which is extremely important.
A way this could be improved is by invalidating all the values that the loops effects, both the values on the stack and on the heap. (We could even start overly conservative and invalidate all the values in the state; setting the known values to unknown values.)
http://reviews.llvm.org/D12358
More information about the cfe-commits
mailing list