PR jit/63854: Fix leak of paths within jump threading

gcc/ChangeLog:
	PR jit/63854
	* tree-ssa-threadedge.c (thread_across_edge): Don't just release
	"path", delete it.
	* tree-ssa-threadupdate.c (delete_jump_thread_path): Likewise.

From-SVN: r217804
This commit is contained in:
David Malcolm 2014-11-19 20:17:44 +00:00 committed by David Malcolm
parent 3b56f890da
commit 89bd38d3c1
3 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2014-11-19 David Malcolm <dmalcolm@redhat.com>
PR jit/63854
* tree-ssa-threadedge.c (thread_across_edge): Don't just release
"path", delete it.
* tree-ssa-threadupdate.c (delete_jump_thread_path): Likewise.
2014-11-19 David Malcolm <dmalcolm@redhat.com> 2014-11-19 David Malcolm <dmalcolm@redhat.com>
PR jit/63854 PR jit/63854

View File

@ -1150,6 +1150,7 @@ thread_across_edge (gcond *dummy_cond,
through the vector entries. */ through the vector entries. */
gcc_assert (path->length () == 0); gcc_assert (path->length () == 0);
path->release (); path->release ();
delete path;
/* A negative status indicates the target block was deemed too big to /* A negative status indicates the target block was deemed too big to
duplicate. Just quit now rather than trying to use the block as duplicate. Just quit now rather than trying to use the block as

View File

@ -2481,6 +2481,7 @@ delete_jump_thread_path (vec<jump_thread_edge *> *path)
for (unsigned int i = 0; i < path->length (); i++) for (unsigned int i = 0; i < path->length (); i++)
delete (*path)[i]; delete (*path)[i];
path->release(); path->release();
delete path;
} }
/* Register a jump threading opportunity. We queue up all the jump /* Register a jump threading opportunity. We queue up all the jump