[llvm] r294572 - LVI: Fix use-of-uninitialized-value after r294463
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 9 01:28:05 PST 2017
Author: vitalybuka
Date: Thu Feb 9 03:28:05 2017
New Revision: 294572
URL: http://llvm.org/viewvc/llvm-project?rev=294572&view=rev
Log:
LVI: Fix use-of-uninitialized-value after r294463
BlockValueStack can be reallocated making reference e invalid.
Modified:
llvm/trunk/lib/Analysis/LazyValueInfo.cpp
Modified: llvm/trunk/lib/Analysis/LazyValueInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyValueInfo.cpp?rev=294572&r1=294571&r2=294572&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyValueInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp Thu Feb 9 03:28:05 2017
@@ -677,7 +677,7 @@ void LazyValueInfoImpl::solve() {
BlockValueStack.clear();
return;
}
- std::pair<BasicBlock *, Value *> &e = BlockValueStack.back();
+ std::pair<BasicBlock *, Value *> e = BlockValueStack.back();
assert(BlockValueSet.count(e) && "Stack value should be in BlockValueSet!");
if (solveBlockValue(e.second, e.first)) {
More information about the llvm-commits
mailing list