r309061 - [StaticAnalyzer] LoopUnrolling - Attempt #2 to fix a crash in r309006.
Peter Szecsi via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 25 16:49:16 PDT 2017
Author: szepet
Date: Tue Jul 25 16:49:16 2017
New Revision: 309061
URL: http://llvm.org/viewvc/llvm-project?rev=309061&view=rev
Log:
[StaticAnalyzer] LoopUnrolling - Attempt #2 to fix a crash in r309006.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/LoopUnrolling.cpp?rev=309061&r1=309060&r2=309061&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/LoopUnrolling.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/LoopUnrolling.cpp Tue Jul 25 16:49:16 2017
@@ -183,9 +183,9 @@ bool isUnrolledLoopBlock(const CFGBlock
LBV.setBlocksOfLoop(E.first, M);
// In case of an inlined function call check if any of its callSiteBlock is
// marked.
- while (BlockSet.find(SearchedBlock) == BlockSet.end() && !StackFrame->inTopFrame()) {
+ while (BlockSet.find(SearchedBlock) == BlockSet.end() && StackFrame) {
SearchedBlock = StackFrame->getCallSiteBlock();
- if(!SearchedBlock)
+ if(!SearchedBlock || StackFrame->inTopFrame())
break;
StackFrame = StackFrame->getParent()->getCurrentStackFrame();
}
More information about the cfe-commits
mailing list