[llvm-commits] [PATCH] Fix memory leak in SelectionDAG.cpp
Evan Cheng
evan.cheng at apple.com
Mon Feb 15 14:51:10 PST 2010
Index: lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/SelectionDAG.cpp (revision 96248)
+++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp (working copy)
@@ -829,6 +829,7 @@
EntryNode.UseList = 0;
AllNodes.push_back(&EntryNode);
Root = getEntryNode();
+ delete Ordering;
Ordering = new SDNodeOrdering();
}
Thanks. But this is somewhat surprising. SelectionDAG::~SelectionDAG() does destroy Ordering. I don't understand under what condition this would leak memory?
Evan
On Feb 15, 2010, at 2:44 PM, nicolas geoffray wrote:
> Dear all,
>
> The following patch fixes a memory leak found by valgrind in SelectionDAG.cpp. I am not familiar with the codegen system, so please someone comment & apply.
>
> Thanks!
> Nicolas
> <leak.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list