mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Fix a nasty dangling pointer problem, due to a free'd pointer being left in
a map. This caused problems if a later object happened to be allocated at the free'd object's address. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d15165723c
commit
a1c972df7d
@ -157,6 +157,9 @@ unsigned CompleteBUDataStructures::calculateSCCGraphs(DSGraph &FG,
|
||||
for (DSGraph::ReturnNodesTy::iterator I = NG->getReturnNodes().begin();
|
||||
I != NG->getReturnNodes().end(); ++I)
|
||||
DSInfo[I->first] = &FG;
|
||||
|
||||
// Remove NG from the ValMap since the pointer may get recycled.
|
||||
ValMap.erase(NG);
|
||||
delete NG;
|
||||
|
||||
Stack.pop_back();
|
||||
|
Loading…
x
Reference in New Issue
Block a user