After cleaning up program state maps in checkDeadSymbols(), a transition should be added to generate the new state.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp | ||
---|---|---|
399 ↗ | (On Diff #148735) | I have two questions may need @NoQ or @xazax.hun who is more familiar with the analyzer engine help to answer.
Thanks in advance! |
Nice catch!
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp | ||
---|---|---|
399 ↗ | (On Diff #148735) |
Yep, you pretty much answered your question. The check in the checker code is unnecessary. |
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp | ||
---|---|---|
399 ↗ | (On Diff #148735) | Thanks, NoQ! It seems that if (state != originalState) in some checkers is misleading and may need to be cleaned up. |
Did the tests execute? I am not sure. First problem is the the container may become dead before the iterator, so its Begin and End symbols may be inaccessible. This is easy to solve by marking the container of the iterator as live. However, there is a second problem that disables correct tracking of iterators: memory regions are marked as dead, however there are LazyCompoundVals referring to them. Is this maybe a bug in SymbolReaper?