mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-04 01:51:31 +00:00
Make ScalarEvolution::forgetLoop forget all contained loops too, because
they may have ValuesAtScopes map entries referencing their outer loops. This fixes a user-after-free reported in PR8471. llvm-svn: 117698
This commit is contained in:
parent
fc007fef16
commit
85557399a1
@ -3781,6 +3781,11 @@ void ScalarEvolution::forgetLoop(const Loop *L) {
|
||||
|
||||
PushDefUseChildren(I, Worklist);
|
||||
}
|
||||
|
||||
// Forget all contained loops too, to avoid dangling entries in the
|
||||
// ValuesAtScopes map.
|
||||
for (Loop::iterator I = L->begin(), E = L->end(); I != E; ++I)
|
||||
forgetLoop(*I);
|
||||
}
|
||||
|
||||
/// forgetValue - This method should be called by the client when it has
|
||||
|
Loading…
Reference in New Issue
Block a user