Author: szepet Date: Tue Jul 25 14:54:58 2017 New Revision: 309036 URL: http://llvm.org/viewvc/llvm-project?rev=309036&view=rev Log: [StaticAnalyzer] LoopUnrolling - Attempt 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=309036&r1=309035&r2=309036&view=diff ============================================================================== --- cfe/trunk/lib/StaticAnalyzer/Core/LoopUnrolling.cpp (original) +++ cfe/trunk/lib/StaticAnalyzer/Core/LoopUnrolling.cpp Tue Jul 25 14:54:58 2017 @@ -183,8 +183,10 @@ 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 (SearchedBlock && BlockSet.find(SearchedBlock) == BlockSet.end()) { + while (BlockSet.find(SearchedBlock) == BlockSet.end() && !StackFrame->inTopFrame()) { SearchedBlock = StackFrame->getCallSiteBlock(); + if(!SearchedBlock) + break; StackFrame = StackFrame->getParent()->getCurrentStackFrame(); } delete M; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits