mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
[SelectionDAG] Fix an use-after-free issue introduced in r305775.
vector.back() will be invalidated when memory reallocation happens. llvm-svn: 305785
This commit is contained in:
parent
4e3209ead1
commit
d2efe6d376
@ -1888,10 +1888,10 @@ CalcNodeSethiUllmanNumber(const SUnit *SU, std::vector<unsigned> &SUNumbers) {
|
||||
for (auto It : WorkList)
|
||||
assert(It.SU != PredSU && "Trying to push an element twice?");
|
||||
#endif
|
||||
WorkList.push_back(PredSU);
|
||||
AllPredsKnown = false;
|
||||
// Next time start processing this one starting from the next pred.
|
||||
Temp.PredsProcessed = P + 1;
|
||||
WorkList.push_back(PredSU);
|
||||
AllPredsKnown = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user