HomePhabricator

[analyzer] Fix the crash in IteratorChecker.cpp when 'SymbolConjured' has a…

Description

[analyzer] Fix the crash in IteratorChecker.cpp when 'SymbolConjured' has a null Stmt.

When the loop has a null terminator statement and sets 'widen-loops=true', 'invalidateRegions' will constructs the 'SymbolConjured' with null 'Stmt'. And this will lead to a crash in 'IteratorChecker.cpp'. This patch use 'dyn_cast_or_null<>' instead of 'dyn_cast<>' in IteratorChecker.cpp.

Differential Revision: https://reviews.llvm.org/D44606

Details

Committed
henrywongMar 20 2018, 2:27 AM
Differential Revision
D44606: [analyzer] Fix the crash in `IteratorChecker.cpp` when `SymbolConjured` has a null Stmt.
Branches
Unknown
Tags
Unknown