mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Fix a memory corruption in Dependency Analysis.
This crash occurs due to memory corruption when trying to update dependency direction based on Constraints. This crash was observed during lnt regression of Polybench benchmark test case dynprog. Review: http://reviews.llvm.org/D8059 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231788 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3651,6 +3651,8 @@ DependenceAnalysis::depends(Instruction *Src, Instruction *Dst,
|
||||
DEBUG(dbgs() << " updating\n");
|
||||
for (int SJ = ConstrainedLevels.find_first(); SJ >= 0;
|
||||
SJ = ConstrainedLevels.find_next(SJ)) {
|
||||
if (SJ > (int)CommonLevels)
|
||||
break;
|
||||
updateDirection(Result.DV[SJ - 1], Constraints[SJ]);
|
||||
if (Result.DV[SJ - 1].Direction == Dependence::DVEntry::NONE)
|
||||
return nullptr;
|
||||
|
Reference in New Issue
Block a user